# Input 'aws-s3' failed with: failed to initialize s3 poller

**URL:** <https://discuss.elastic.co/t/input-aws-s3-failed-with-failed-to-initialize-s3-poller/288130>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 1, 2021, 11:32am UTC](https://discuss.elastic.co/t/input-aws-s3-failed-with-failed-to-initialize-s3-poller/288130 "2021-11-01T11:32:33Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Andrea\_Spacca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrea_spacca/32/76976_2.png) [@Andrea\_Spacca](https://discuss.elastic.co/u/Andrea_Spacca)\
**Post date:** [November 5, 2021, 11:39am UTC](https://discuss.elastic.co/t/input-aws-s3-failed-with-failed-to-initialize-s3-poller/288130/12 "2021-11-05T11:39:10Z")

</div>

@Ayush_Mathur

can you try running the following aws-cli command using the IAM resource used by filebeat?

```auto
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.

---

_[View the full topic](https://discuss.elastic.co/t/input-aws-s3-failed-with-failed-to-initialize-s3-poller/288130)._
