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

<div class="post-metadata">

**Author:** ![MrAtheist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mratheist/32/98751_2.png) [@MrAtheist](https://discuss.elastic.co/u/MrAtheist)\
**Post date:** [December 11, 2021, 8:08pm UTC](https://discuss.elastic.co/t/input-aws-s3-failed-with-failed-to-initialize-s3-poller/288130/40 "2021-12-11T20:08:19Z")

</div>

I'm also pulling my hair on this black hole of an issue... i got this cross account setup like so:

```auto
# UserA (in account A)

{
       "Effect": "Allow",
       "Action": [
           "s3:GetObject",
           "s3:ListBucket",
           "s3:GetBucketLocation"
       ],
       "Resource": [
           "arn:aws:s3:::bucket-in-ca-central-1/*",
           "arn:aws:s3:::bucket-in-ca-central-1"
       ]
   }

```

```auto
# BucketB (in account B)

{
    "Sid": "AllowFilebeatPolling",
    "Effect": "Allow",
    "Principal": {
      "AWS": "arn:aws:iam::1234567890:user/UserA"
    },
    "Action": [
      "s3:GetObject",
      "s3:ListBucket",
      "s3:GetBucketLocation"
    ],
    "Resource": [
      "arn:aws:s3:::${var.s3_bucket_name}",
      "arn:aws:s3:::${var.s3_bucket_name}/*"
    ]
}

```

I can replicate all the actions with the equivalent cli as user A to bucket B, it works as expected, BUT whenever i tried to initialize filebeat it spits back 403...

```auto
... compat/compat.go: 122
"Input 'aws-s3' failed with: failed to initialize s3 poller: failed to get AWS region for bucket_arn:

```

So im wondering does it have something to do with "block all public access" on the bucket itself? I'll report back later with what i find...

---

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