Use path-style URL in resolve_bucket_region for dotted bucket names#752
Merged
alamb merged 1 commit intoJun 15, 2026
Merged
Conversation
resolve_bucket_region for dotted bucket names
S3's wildcard TLS cert (*.s3.amazonaws.com) only covers one DNS label. Use path-style for bucket names containing dots. Closes apache#747
brankogrb-db
force-pushed
the
fix/resolve-bucket-region-dotted-names
branch
from
June 15, 2026 08:40
5e459f7 to
1fbd90e
Compare
kylebarron
approved these changes
Jun 15, 2026
Contributor
|
Thank you @brankogrb-db and @kylebarron |
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.
Summary
resolve_bucket_regionunconditionally uses virtual-hosted-style URLs ({bucket}.s3.amazonaws.com). When the bucket name contains dots, this produces a hostname that doesn't match S3's*.s3.amazonaws.comwildcard TLS certificate (wildcards only cover a single DNS label), causing the TLS handshake to fail.This PR falls back to path-style (
s3.amazonaws.com/{bucket}) when the bucket name contains a dot — the same heuristic the official AWS SDKs use.resolve_bucket_regionfails TLS handshake for bucket names containing dots #747