Honor path_style for non-AWS S3 buckets - #52003
Merged
MichaelKatsoulis merged 5 commits intoJul 20, 2026
Merged
Conversation
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
|
This pull request doesn't have a |
Contributor
Author
|
@Kavindu-Dodan I anonymized the test |
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Contributor
|
@Mergifyio backport 9.5 9.4 9.3 8.19 |
Contributor
✅ Backports have been createdDetails
|
This was referenced Jul 20, 2026
MichaelKatsoulis
added a commit
that referenced
this pull request
Jul 20, 2026
MichaelKatsoulis
added a commit
that referenced
this pull request
Jul 20, 2026
MichaelKatsoulis
added a commit
that referenced
this pull request
Jul 20, 2026
MichaelKatsoulis
added a commit
that referenced
this pull request
Jul 20, 2026
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.
Proposed commit message
The aws-s3 input set
HostnameImmutable = (getBucketARN() != "")when a customendpoint was configured.
getBucketARN()also returns the bucket name fornon_aws_bucket_name, so any non-AWS S3-compatible bucket with a customendpoint ended up with
HostnameImmutable=true. In the AWS SDK v2 an immutablehostname forces path-style requests and ignores
path_styleparameter.This broke providers that require virtual-hosted addressing (e.g. Huawei Cloud
OBS): every
ListObjectsV2failed withVirtualHostDomainRequired(403) and nodata was ingested, with no config-side workaround.
The fix is scope the immutable hostname to AWS bucket-ARN / access-point polling only:
For non-AWS buckets the hostname is now mutable, so
path_stylecontrolsaddressing: virtual-hosted when
path_style: false(default), path-style whenpath_style: true.Disruptive user impact
path_stylenow takes effect for non-AWS buckets where it was previouslyignored. Non-AWS users who relied on the old forced path-style
behavior and did not set
path_stylemay need to setpath_style: true.But this fixes a real bug.
Related SDH