[9.5](backport #52003) Honor path_style for non-AWS S3 buckets - #52072
Merged
Conversation
* Honor path_style for non-AWS S3 buckets * update fragment * fix linter issues * anonymize data (cherry picked from commit f78d5e8)
Contributor
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
MichaelKatsoulis
approved these changes
Jul 20, 2026
MichaelKatsoulis
enabled auto-merge (squash)
July 20, 2026 09:40
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
This is an automatic backport of pull request Honor path_style for non-AWS S3 buckets #52003 done by Mergify.