Skip to content

[9.5](backport #52003) Honor path_style for non-AWS S3 buckets - #52072

Merged
MichaelKatsoulis merged 1 commit into
9.5from
mergify/bp/9.5/pr-52003
Jul 20, 2026
Merged

[9.5](backport #52003) Honor path_style for non-AWS S3 buckets#52072
MichaelKatsoulis merged 1 commit into
9.5from
mergify/bp/9.5/pr-52003

Conversation

@mergify

@mergify mergify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

The aws-s3 input set HostnameImmutable = (getBucketARN() != "") when a custom
endpoint was configured. getBucketARN() also returns the bucket name for
non_aws_bucket_name, so any non-AWS S3-compatible bucket with a custom
endpoint ended up with HostnameImmutable=true. In the AWS SDK v2 an immutable
hostname forces path-style requests and ignores path_style parameter.

This broke providers that require virtual-hosted addressing (e.g. Huawei Cloud
OBS): every ListObjectsV2 failed with VirtualHostDomainRequired (403) and no
data was ingested, with no config-side workaround.

The fix is scope the immutable hostname to AWS bucket-ARN / access-point polling only:

e.HostnameImmutable = (c.getBucketARN() != "" && c.NonAWSBucketName == "")

For non-AWS buckets the hostname is now mutable, so path_style controls
addressing: virtual-hosted when path_style: false (default), path-style when
path_style: true.

Disruptive user impact

path_style now takes effect for non-AWS buckets where it was previously
ignored. Non-AWS users who relied on the old forced path-style
behavior and did not set path_style may need to set path_style: true.
But this fixes a real bug.

Related SDH

* Honor path_style for non-AWS S3 buckets

* update fragment

* fix linter issues

* anonymize data

(cherry picked from commit f78d5e8)
@mergify mergify Bot added the backport label Jul 20, 2026
@mergify
mergify Bot requested a review from a team as a code owner July 20, 2026 08:17
@mergify mergify Bot added the backport label Jul 20, 2026
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@github-actions github-actions Bot added Team:obs-ds-hosted-services Label for the Observability Hosted Services team bugfix labels Jul 20, 2026
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 20, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@MichaelKatsoulis
MichaelKatsoulis enabled auto-merge (squash) July 20, 2026 09:40
@MichaelKatsoulis
MichaelKatsoulis merged commit 5abdb8c into 9.5 Jul 20, 2026
39 checks passed
@MichaelKatsoulis
MichaelKatsoulis deleted the mergify/bp/9.5/pr-52003 branch July 20, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bugfix Team:obs-ds-hosted-services Label for the Observability Hosted Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant