Conversation
aemous
approved these changes
Apr 8, 2026
Contributor
aemous
left a comment
There was a problem hiding this comment.
LGTM. I've also verified the signing region set config is correctly being used in AWS CLI v2 on this branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a port of boto/botocore#3663 for AWS CLI v2
Overview
Fix
sigv4a_signing_region_setbeing ignored when SigV4A is selected viaauth_scheme_preferenceor explicitsignature_version='v4a', causingX-Amz-Region-Setto fall back to the endpoint-derived region (e.g.,us-west-2instead of*).Problem
SigV4A signing-context setup only ran inside
set_operation_specific_signer()whenauth_type == 'v4a'. This path isn't reached when SigV4A is resolved later by_set_auth_scheme_preference_signer()or configured directly on the client, so the region set was never applied.Solution
Extract the SigV4A signing-context update into a shared helper and call it whenever the resolved signer is
v4a, preserving existing region-set precedence.Testing
Added unit coverage for:
auth_scheme_preference='sigv4a'applying the configured SigV4A region setexplicit signature_version='v4a'applying the configured SigV4A region setBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.