Skip to content

[filebeat] [s3 input] Use configured region when non_aws_bucket_name is defined#48534

Merged
tetianakravchenko merged 10 commits intoelastic:mainfrom
tetianakravchenko:s3input-fix
Feb 10, 2026
Merged

[filebeat] [s3 input] Use configured region when non_aws_bucket_name is defined#48534
tetianakravchenko merged 10 commits intoelastic:mainfrom
tetianakravchenko:s3input-fix

Conversation

@tetianakravchenko
Copy link
Contributor

@tetianakravchenko tetianakravchenko commented Jan 26, 2026

Proposed commit message

  • WHAT: use user-configured region when non_aws_bucket_name is defined
  • WHY: To avoid calling GetBucketLocation API to determine the bucket region, when non_aws_bucket_name is used for S3-compatible services (e.g., Alibaba Cloud OSS, MinIO, DigitalOcean Spaces)

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

Now region configuration parameter is required when non_aws_bucket_name is set

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

…e is defined

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko tetianakravchenko requested review from a team as code owners January 26, 2026 10:52
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 26, 2026
@github-actions
Copy link
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
@mergify
Copy link
Contributor

mergify bot commented Jan 26, 2026

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @tetianakravchenko? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2026

🔍 Preview links for changed docs

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jan 26, 2026
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 26, 2026
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@pierrehilbert pierrehilbert requested a review from faec January 26, 2026 15:11
@pierrehilbert pierrehilbert added Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Docs Label for the Observability docs team labels Jan 26, 2026
@elasticmachine
Copy link
Contributor

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

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Copy link
Member

@mauri870 mauri870 left a comment

Choose a reason for hiding this comment

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

I skimmed through the changes and they look fine to me, but I'm not very familiar with the S3 input to give detailed feedback.

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko tetianakravchenko added the backport-active-all Automated backport with mergify to all the active branches label Feb 5, 2026
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan 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 left one nit - https://github.com/elastic/beats/pull/48534/changes#r2783833944 feel free to check if it makes sense and merge when ready

…-detection.yaml

Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@tetianakravchenko tetianakravchenko enabled auto-merge (squash) February 10, 2026 16:30
@tetianakravchenko tetianakravchenko removed the request for review from faec February 10, 2026 16:31
@tetianakravchenko tetianakravchenko merged commit b34256a into elastic:main Feb 10, 2026
18 checks passed
@tetianakravchenko tetianakravchenko deleted the s3input-fix branch February 10, 2026 16:35
@github-actions
Copy link
Contributor

@Mergifyio backport 8.19 9.2 9.3

@mergify
Copy link
Contributor

mergify bot commented Feb 10, 2026

backport 8.19 9.2 9.3

✅ Backports have been created

Details

Cherry-pick of b34256a has failed:

On branch mergify/bp/8.19/pr-48534
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit b34256a57.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/fragments/1769424344-filebeat-awss3-input-fix-region-detection.yaml
	modified:   x-pack/filebeat/_meta/config/filebeat.inputs.reference.xpack.yml.tmpl
	modified:   x-pack/filebeat/filebeat.reference.yml
	modified:   x-pack/filebeat/input/awss3/config.go
	modified:   x-pack/filebeat/input/awss3/config_test.go
	modified:   x-pack/filebeat/input/awss3/s3.go
	modified:   x-pack/filebeat/input/awss3/s3_test.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   docs/reference/filebeat/filebeat-input-aws-s3.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Feb 10, 2026
…` is defined (#48534)

* filebeat s3 input: use user-configured region when non_aws_bucket_name is defined

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add changelog fragment

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add configuration validation and corresponding config tests

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add more detailed fragment summary

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* drop redundant region check in createS3API, rely on config validation

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* Update changelog/fragments/1769424344-filebeat-awss3-input-fix-region-detection.yaml

Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
(cherry picked from commit b34256a)

# Conflicts:
#	docs/reference/filebeat/filebeat-input-aws-s3.md
mergify bot pushed a commit that referenced this pull request Feb 10, 2026
…` is defined (#48534)

* filebeat s3 input: use user-configured region when non_aws_bucket_name is defined

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add changelog fragment

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add configuration validation and corresponding config tests

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add more detailed fragment summary

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* drop redundant region check in createS3API, rely on config validation

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* Update changelog/fragments/1769424344-filebeat-awss3-input-fix-region-detection.yaml

Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
(cherry picked from commit b34256a)
mergify bot pushed a commit that referenced this pull request Feb 10, 2026
…` is defined (#48534)

* filebeat s3 input: use user-configured region when non_aws_bucket_name is defined

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add changelog fragment

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add configuration validation and corresponding config tests

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add more detailed fragment summary

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* drop redundant region check in createS3API, rely on config validation

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* Update changelog/fragments/1769424344-filebeat-awss3-input-fix-region-detection.yaml

Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
(cherry picked from commit b34256a)
tetianakravchenko added a commit that referenced this pull request Feb 12, 2026
…` is defined (#48534) (#48781)

* filebeat s3 input: use user-configured region when non_aws_bucket_name is defined



* add changelog fragment



* add configuration validation and corresponding config tests



* add more detailed fragment summary



* drop redundant region check in createS3API, rely on config validation



* Update changelog/fragments/1769424344-filebeat-awss3-input-fix-region-detection.yaml



---------



(cherry picked from commit b34256a)

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
tetianakravchenko added a commit that referenced this pull request Feb 12, 2026
…` is defined (#48534) (#48782)

* filebeat s3 input: use user-configured region when non_aws_bucket_name is defined



* add changelog fragment



* add configuration validation and corresponding config tests



* add more detailed fragment summary



* drop redundant region check in createS3API, rely on config validation



* Update changelog/fragments/1769424344-filebeat-awss3-input-fix-region-detection.yaml



---------



(cherry picked from commit b34256a)

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
tetianakravchenko added a commit that referenced this pull request Feb 13, 2026
…hen `non_aws_bucket_name` is defined (#48780)

* [filebeat] [s3 input] Use configured region when `non_aws_bucket_name` is defined (#48534)

* filebeat s3 input: use user-configured region when non_aws_bucket_name is defined

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add changelog fragment

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add configuration validation and corresponding config tests

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* add more detailed fragment summary

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* drop redundant region check in createS3API, rely on config validation

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* Update changelog/fragments/1769424344-filebeat-awss3-input-fix-region-detection.yaml

Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
(cherry picked from commit b34256a)

# Conflicts:
#	docs/reference/filebeat/filebeat-input-aws-s3.md

* fix the conflict; add information about the region configuration with non_aws_bucket_name for s3 input

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Co-authored-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches bug Team:Docs Label for the Observability docs team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:obs-ds-hosted-services Label for the Observability Hosted Services team

8 participants