Skip to content

Set default region for CRT transfer clients - #10705

Merged
hssyoo merged 1 commit into
v2from
crt-no-region
Sep 29, 2026
Merged

hssyoo merged 1 commit into
v2from
crt-no-region

Conversation

@hssyoo

@hssyoo hssyoo commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #10703

When the transfer client is resolved to CRT and there's no region configured, the AWS CLI errors with 255 exit code. This is because CRT client creation asserts that a region is passed. This PR updates the CRT client constructor so it mirror's botocore's behavior of using the global endpoint/us-east-1 and letting the redirect handler resolve potential redirect errors.

@hssyoo
hssyoo requested a review from a team as a code owner September 29, 2026 15:08
@aemous

aemous commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Worth adding regression blackbox tests. Probably not in this PR because blackbox tests have not been merged yet.


def _resolve_crt_client_region(self, params):
# Match botocore, which signs for us-east-1 when no region is set.
return self._resolve_region(params) or 'us-east-1'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this works, but looking at the Python plumbing I think we're actually resolving aws-global out of endpoints.json, which is then mapped to us-east-1 via the endpoint rules.

If possible, I'd rather honor the same source of truth instead of a new hardcoded ue-east-1.

@hssyoo
hssyoo merged commit 3944677 into v2 Sep 29, 2026
109 of 112 checks passed
@hssyoo
hssyoo deleted the crt-no-region branch September 29, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants