diff --git a/src/Private/ServiceName.cs b/src/Private/ServiceName.cs index 1974da04..9d104163 100644 --- a/src/Private/ServiceName.cs +++ b/src/Private/ServiceName.cs @@ -4,5 +4,6 @@ internal static class ServiceName { internal const string OpenSearchServerless = "aoss"; internal const string S3 = "s3"; + internal const string VpcLatticeService = "vpc-lattice-svcs"; } } diff --git a/src/Private/Signer.cs b/src/Private/Signer.cs index 405d0e50..9c78cc9f 100644 --- a/src/Private/Signer.cs +++ b/src/Private/Signer.cs @@ -23,7 +23,9 @@ public static async Task SignAsync( UpdateRequestUri(request, baseAddress); - var contentHash = await ContentHash.CalculateAsync(request.Content).ConfigureAwait(false); + var contentHash = serviceName == ServiceName.VpcLatticeService ? + "UNSIGNED-PAYLOAD" : + await ContentHash.CalculateAsync(request.Content).ConfigureAwait(false); AddHeaders(request, now, serviceName, credentials, contentHash); @@ -136,6 +138,7 @@ private static void AddHeaders( request.AddHeaderIf(credentials.UseToken, HeaderKeys.XAmzSecurityTokenHeader, credentials.Token); request.AddHeaderIf(!request.Headers.Contains(HeaderKeys.HostHeader), HeaderKeys.HostHeader, request.RequestUri!.Host); request.AddHeaderIf(serviceName == ServiceName.OpenSearchServerless, HeaderKeys.XAmzContentSha256Header, contentHash); + request.AddHeaderIf(serviceName == ServiceName.VpcLatticeService, HeaderKeys.XAmzContentSha256Header, contentHash); request.AddHeaderIf(serviceName == ServiceName.S3, HeaderKeys.XAmzContentSha256Header, contentHash); }