# Can't seem to register a snapshot repository with AWS S3

**URL:** <https://discuss.elastic.co/t/cant-seem-to-register-a-snapshot-repository-with-aws-s3/169026>\
**Category:** Elasticsearch\
**Created:** [February 19, 2019, 1:24pm UTC](https://discuss.elastic.co/t/cant-seem-to-register-a-snapshot-repository-with-aws-s3/169026 "2019-02-19T13:24:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![3minus1](https://avatars.discourse-cdn.com/v4/letter/3/85f322/32.png) [@3minus1](https://discuss.elastic.co/u/3minus1)\
**Post date:** [February 19, 2019, 1:24pm UTC](https://discuss.elastic.co/t/cant-seem-to-register-a-snapshot-repository-with-aws-s3/169026/1 "2019-02-19T13:24:02Z")

</div>

I'm running an Elasticsearch V6.3.2 cluster on Kubernetes, and I've installed the `repository-s3` plugin.  
I've added my AWS Access Key and Secret Key to the `elasticsearch.keystore`.

I'm trying to register my snapshot repository with:

`curl -X PUT -H "Content-Type: application/json" -d '{ "type": "s3", "settings": { "bucket": "efk-snapshots-k8s" } }' "localhost:9200/_snapshot/snap123"`

The above request fails with:

```auto
    {
      "error":{
        "root_cause":[
          {
            "type":"amazon_s3_exception",
            "reason":"amazon_s3_exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: 962AE79FCC57FA8E; S3 Extended Request ID: kyx9TnYewW8NUk35CsJRLy7SF7iCsg515zhXtOMjz4EdsxGUBJYaqHgs/e2SZCatEWQHwLFd39k=)"
          }
        ],
        "type":"blob_store_exception",
        "reason":"Failed to check if blob [master.dat-temp] exists",
        "caused_by":{
          "type":"amazon_s3_exception",
          "reason":"amazon_s3_exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: 962AE79FCC57FA8E; S3 Extended Request ID: kyx9TnYewW8NUk35CsJRLy7SF7iCsg515zhXtOMjz4EdsxGUBJYaqHgs/e2SZCatEWQHwLFd39k=)"
        }
      },
      "status":500
    }

```

I have granted appropriate permissions with the IAM policy, even so far that I tried giving it complete S3 access, but still no luck. What's going wrong here?

---

<div class="post-metadata">

**Author:** ![stash2logs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stash2logs/32/42101_2.png) [@stash2logs](https://discuss.elastic.co/u/stash2logs)\
**Post date:** [February 23, 2019, 1:53am UTC](https://discuss.elastic.co/t/cant-seem-to-register-a-snapshot-repository-with-aws-s3/169026/2 "2019-02-23T01:53:04Z")

</div>

I’m having the exact same issue and I’ve not been able to find a solution. Can you provide your IAM role permissions?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 23, 2019, 2:02am UTC](https://discuss.elastic.co/t/cant-seem-to-register-a-snapshot-repository-with-aws-s3/169026/3 "2019-03-23T02:02:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
