# 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:** 28

<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:** [December 1, 2021, 1:05pm UTC](https://discuss.elastic.co/t/input-aws-s3-failed-with-failed-to-initialize-s3-poller/288130/28 "2021-12-01T13:05:51Z")

</div>

@Ayush_Mathur  
`AWS_DEFAULT_REGION` env variable is not read by Filebeat.  
Currently where is no possibility to set an AWS region for Filebeat S3 input.  
This is taken care by setting it initially to `us-east-1` in the S3 client used by Filebeat, that does then a first request to get the bucket region and then override the region of the S3 client accordingly.  
This first request is indeed the one that fails for you.

Please try running the following aws cli command:  
`aws s3api get-bucket-location --debug --bucket es-backup-xxxxx --endpoint-url https://s3.us-east-1.amazonaws.com`

this is what Filebeat does. Provide the IAM user or role that Filebeat uses.

---

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