diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift index 670374d8d6f..067c3ef0b16 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift @@ -80,20 +80,6 @@ extension EndpointResolverMiddleware: ApplyEndpoint { builder.withProtocol(protocolType) } - if let signingName = signingName { - attributes.signingName = signingName - attributes.selectedAuthScheme = selectedAuthScheme?.getCopyWithUpdatedSigningProperty( - key: SigningPropertyKeys.signingName, value: signingName - ) - } - - if let signingRegion = signingRegion { - attributes.signingRegion = signingRegion - attributes.selectedAuthScheme = selectedAuthScheme?.getCopyWithUpdatedSigningProperty( - key: SigningPropertyKeys.signingRegion, value: signingRegion - ) - } - if let signingAlgorithm = signingAlgorithm { attributes.signingAlgorithm = SigningAlgorithm(rawValue: signingAlgorithm) } diff --git a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift b/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift index d92486cf6e3..194f95c6a62 100644 --- a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift +++ b/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift @@ -32,7 +32,10 @@ public struct SigV4AAuthScheme: AuthScheme { // Set signing name and signing region flags updatedSigningProperties.set(key: SigningPropertyKeys.signingName, value: context.signingName) - updatedSigningProperties.set(key: SigningPropertyKeys.signingRegion, value: context.signingRegion) + updatedSigningProperties.set( + key: SigningPropertyKeys.signingRegion, + value: signingProperties.get(key: SigningPropertyKeys.signingRegion) ?? context.signingRegion + ) // Set expiration flag // diff --git a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift b/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift index a7e46087c2d..79d8ea06487 100644 --- a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift +++ b/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift @@ -39,7 +39,10 @@ public struct SigV4AuthScheme: AuthScheme { // Set signing name and signing region flags updatedSigningProperties.set(key: SigningPropertyKeys.signingName, value: context.signingName) - updatedSigningProperties.set(key: SigningPropertyKeys.signingRegion, value: context.signingRegion) + updatedSigningProperties.set( + key: SigningPropertyKeys.signingRegion, + value: signingProperties.get(key: SigningPropertyKeys.signingRegion) ?? context.signingRegion + ) // Set expiration flag //