# Shared / Cross-Acccount S3 repository for snapshots - Access Denied

**URL:** <https://discuss.elastic.co/t/shared-cross-acccount-s3-repository-for-snapshots-access-denied/123252>\
**Category:** Elasticsearch\
**Created:** [March 9, 2018, 11:19am UTC](https://discuss.elastic.co/t/shared-cross-acccount-s3-repository-for-snapshots-access-denied/123252 "2018-03-09T11:19:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![baltendo](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@baltendo](https://discuss.elastic.co/u/baltendo)\
**Post date:** [March 9, 2018, 11:19am UTC](https://discuss.elastic.co/t/shared-cross-acccount-s3-repository-for-snapshots-access-denied/123252/1 "2018-03-09T11:19:31Z")

</div>

Hi!

We want that our test elasticsearch cluster is able to restore snapshots from our live elasticsearch.  
This worked fine in the past when we had one AWS account but now the clusters are in different AWS accounts for security reasons.  
Both clusters run on version 5.4.2.

But once we want to list or restore the snapshots we get an "Access Denied" error.

```auto
{
    "error": {
        "root_cause": [
            {
                "type": "amazon_s3_exception",
                "reason": "Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: CDF4B9B4438384B5)"
            }
        ],
        "type": "amazon_s3_exception",
        "reason": "Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: CDF4B9B4438384B5)"
    },
    "status": 500
}

```

Adding the repository worked (it doesn't when we change the permissions).  
Listing, adding, reading and deleting objects from this s3 bucket works using the `aws s3` commands.

Thanks in advance for the help!

---

<div class="post-metadata">

**Author:** ![baltendo](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@baltendo](https://discuss.elastic.co/u/baltendo)\
**Post date:** [March 14, 2018, 2:19pm UTC](https://discuss.elastic.co/t/shared-cross-acccount-s3-repository-for-snapshots-access-denied/123252/2 "2018-03-14T14:19:03Z")

</div>

We fixed it by specifying AWS credentials when the snapshot repository on the test cluster is added.

We found the solution on the following page (look for "Elasticsearch setup backup Repository with AWS User credentials")

> **[Elasticsearch Backup : Snapshot and Restore on AWS S3](https://medium.com/@federicopanini/elasticsearch-backup-snapshot-and-restore-on-aws-s3-f1fc32fbca7f)**
>
> how to make backup for Elasticsearch and restore them

---

<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:** [April 11, 2018, 2:19pm UTC](https://discuss.elastic.co/t/shared-cross-acccount-s3-repository-for-snapshots-access-denied/123252/3 "2018-04-11T14:19:34Z")

</div>

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