Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 11, 2024

Proposed commit message

This PR sets the region of the S3 bucket as the region in AWS config to make API calls.

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
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

Without this change, run Filebeat aws-s3 input with this config and you will see error:

s3 GetObject failed: operation error S3: GetObject, https response error StatusCode: 301, RequestID: 01H7T2XWRZ6N44MW, HostID: WqYAZM+diCdCnBwj2i1tAzchSXBZql8SdIfQ0ZUCKHoR4YbMiBGD10duVYqIQ97pCg/j8MmJTgo=, api error PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

config:

filebeat.inputs:
- type: aws-s3
  enabled: true
  credential_profile_name: elastic-observability
  number_of_workers: 5
  bucket_arn: 'arn:aws:s3:::tkravchenko-test1'

The workaround is to add default_region: us-east-2 in the config.

With this change, Filebeat is able to get the bucket location/region from API call and assign it to the region config.


This is an automatic backport of pull request #41572 done by Mergify.

This PR sets the region of the S3 bucket as the region in AWS config to make API calls.

(cherry picked from commit 076ea50)
@mergify mergify bot added the backport label Nov 11, 2024
@mergify mergify bot requested a review from a team as a code owner November 11, 2024 16:56
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 11, 2024
@botelastic
Copy link

botelastic bot commented Nov 11, 2024

This pull request doesn't have a Team:<team> label.

@kaiyan-sheng kaiyan-sheng merged commit 234f823 into 8.x Nov 11, 2024
7 checks passed
@kaiyan-sheng kaiyan-sheng deleted the mergify/bp/8.x/pr-41572 branch November 11, 2024 22:11
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport needs_team Indicates that the issue/PR needs a Team:* label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants