# Snapshot to S3

**URL:** https://discuss.elastic.co/t/snapshot-to-s3/17029
**Category:** Elasticsearch
**Created:** [April 15, 2014, 3:26pm UTC](https://discuss.elastic.co/t/snapshot-to-s3/17029 "2014-04-15T15:26:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Bastien\_Chong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bastien_chong/32/1393_2.png) [@Bastien\_Chong](https://discuss.elastic.co/u/Bastien_Chong)
#### Post date: [April 15, 2014, 3:26pm UTC](https://discuss.elastic.co/t/snapshot-to-s3/17029/1 "2014-04-15T15:26:38Z")

</div>

I'm trying to setup S3 backup with Elasticsearch 1.1.0 new snapshot feature.

For that I installed the cloud-aws plugin

> **[GitHub - elastic/elasticsearch-cloud-aws: AWS Cloud Plugin for Elasticsearch](https://github.com/elastic/elasticsearch-cloud-aws#s3-repository)**
>
> AWS Cloud Plugin for Elasticsearch. Contribute to elastic/elasticsearch-cloud-aws development by creating an account on GitHub.

I followed this instruction by adding my bucket like that :

curl -XPUT '[http://localhost:9200/\_snapshot/mybucket](http://localhost:9200/_snapshot/mybucket)' -d '{

> ```
> "type": "s3",
> "settings": {
> "bucket": "mybucket",
> "region": "us-west-2"
> }
> 
> ```
> 
> }'

And in\* elasticsearch.yml\* :

cloud:

> ```
> aws:
> access_key: xxxxxxxxxxxxx
> secret_key: xxxxxxxxxx
> region: us-west-2
> 
> ```
> 
> repositories:  
> s3:  
> region: us-west-2  
> private-bucket:  
> bucket: mybucket  
> access\_key: yyyyyyyyyyyyyyyyyyy  
> secret\_key: yyyyyyyyyyyyyyyyyyy

When I try to create the snapshot : curl -s -XPUT  
"localhost:9200/\_snapshot/mybucket/snapshot\_2?wait\_for\_completion=true"

I get : {"error":"SnapshotCreationException[[mybucket:snapshot\_2] failed to  
create snapshot]; nested: IOException[Failed to get [snapshot-snapshot\_2]];  
nested: AmazonS3Exception[Status Code: 403, AWS Service: Amazon S3, AWS  
Request ID: xxxxxxxx, AWS Error Code: AccessDenied, AWS Error Message:  
Access Denied]; ","status":500}

My default access/secret key does not have access to this bucket, so I have  
to use private-bucket. But I don't know how to make this work.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/98db6110-17fe-4809-9d41-26277ed91595%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/98db6110-17fe-4809-9d41-26277ed91595%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 6, 2017, 1:35am UTC](https://discuss.elastic.co/t/snapshot-to-s3/17029/2 "2017-07-06T01:35:43Z")

</div>


