Skip to content

[v2] Auto-detect account regional namespace buckets in s3 mb#10212

Open
AndrewAsseily wants to merge 7 commits intov2from
s3-mb-account-regional-namespace
Open

[v2] Auto-detect account regional namespace buckets in s3 mb#10212
AndrewAsseily wants to merge 7 commits intov2from
s3-mb-account-regional-namespace

Conversation

@AndrewAsseily
Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

The s3 mb command now automatically detects account regional namespace bucket names (matching *---an) and sets the x-amz-bucket-namespace: account-regional header on the CreateBucket request. Previously, users had to fall back to s3api create-bucket --bucket-namespace for
this workflow.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aemous aemous self-requested a review April 15, 2026 20:52
@aemous aemous self-assigned this Apr 15, 2026
Copy link
Copy Markdown
Contributor

@aemous aemous left a comment

Choose a reason for hiding this comment

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

Left some comments.

Also, consider adding ~1 integration test. We are making some assumption on server behavior so it may be worth baking that into tests. Such as, attempt to create a bucket with name xyz-an, and expect s3 to return an error that the formatting is wrong.

Comment thread .changes/next-release/enhancement-s3-61261.json Outdated
Comment thread .changes/next-release/enhancement-s3-61261.json Outdated
Comment thread awscli/customizations/s3/utils.py Outdated
Comment thread tests/functional/s3/test_mb_command.py Outdated
Comment thread tests/functional/s3/test_mb_command.py
@AndrewAsseily AndrewAsseily requested a review from aemous April 20, 2026 14:59
aemous
aemous previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Contributor

@aemous aemous left a comment

Choose a reason for hiding this comment

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

LGTM.

I approve merge assuming all CI pass. At least 1 new integ test may be added before merge as long as they have been tested.

@AndrewAsseily AndrewAsseily changed the title Auto-detect account regional namespace buckets in s3 mb [v2] Auto-detect account regional namespace buckets in s3 mb Apr 20, 2026
aemous
aemous previously approved these changes Apr 20, 2026
Copy link
Copy Markdown
Contributor

@aemous aemous left a comment

Choose a reason for hiding this comment

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

LGTM assuming CI passes and the new integ test was tested.

🏆

Copy link
Copy Markdown
Contributor

@aemous aemous left a comment

Choose a reason for hiding this comment

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

LGTM if all CI pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants