can you try running the following aws-cli command using the IAM resource used by filebeat?
aws s3api get-bucket-location --bucket test-bucket-1-stos
As for the config params:
endpoint
is not needed if your bucket must not be accessed from a custom domain, like your case
default_region
is not supported in filebeat. You can set the env variable AWS_DEFAULT_REGION
to override it if you want.
If not region is set (either missing or empty AWS_DEFAULT_REGION
env or setting in ~/.aws/config
or in EC2 instance metadata) us-east-1
is used as fallback.
This will be the region used for the GetBucketLocation
request, once we get the region of the bucket we will use it in the following AWS call to that bucket.
GetBucketLocation
is not region bound: you can perform the request from any region to a bucket in any other regions, and receive a proper result.