# Fail to create S3 Repository

**URL:** <https://discuss.elastic.co/t/fail-to-create-s3-repository/117549>\
**Category:** Elasticsearch\
**Created:** [January 29, 2018, 11:26pm UTC](https://discuss.elastic.co/t/fail-to-create-s3-repository/117549 "2018-01-29T23:26:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![smithomega](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@smithomega](https://discuss.elastic.co/u/smithomega)\
**Post date:** [January 29, 2018, 11:26pm UTC](https://discuss.elastic.co/t/fail-to-create-s3-repository/117549/1 "2018-01-29T23:26:02Z")

</div>

hi,

I am unable to create an S3 Repository. Ive tried against a Cloudian and AWS but I cant seem to get it to create and I get a very generic error.

name component version  
RNtA5y5 repository-s3 6.1.2

I am trying:

{  
"type": "s3",  
"settings": {  
"bucket": "dusty-buckets",  
"region": "us-east-1"  
}  
}

Ive tried:

{  
"type": "s3",  
"settings": {  
"endpoint": "[s3.us-east-1.amazonaws.com](http://s3.us-east-1.amazonaws.com)",  
"role\_arn": "arn:aws:iam::XXXXXXXXXXX:role/cloudian2",  
"bucket": "dusty-buckets",  
"region": "us-east-1"  
}  
}

I used the IAM credentials for the resource in AWS and no luck always I get:  
{  
"error": {  
"root\_cause": [  
{  
"type": "repository\_exception",  
"reason": "[mys3backup] failed to create repository"  
}  
],  
"type": "repository\_exception",  
"reason": "[mys3backup] failed to create repository",  
"caused\_by": {  
"type": "amazon\_s3\_exception",  
"reason": "Bad Request (Service: Amazon S3; Status Code: 400; Error Code: 400 Bad Request; Request ID: 43E9334844BA1F46; S3 Extended Request ID: Xx80yBiDKhYNG2dqjcqaP9pmytoU5zD0pJQog/CqSNDUcQW2p3QY6qTB+n68szZRgc+S93SnA/o=)"  
}  
},  
"status": 500

I had to place my access keys in the keystore as the insecure passing of these is no longer allowed. But I cant even tell if its trying to connect.

I get a generic FAIL but I dont know what the issue is. Can anyone give me a next thing to check as I need S3 to elastic for snapshots.

Thanks  
-smithomega

---

<div class="post-metadata">

**Author:** ![smithomega](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@smithomega](https://discuss.elastic.co/u/smithomega)\
**Post date:** [January 29, 2018, 11:54pm UTC](https://discuss.elastic.co/t/fail-to-create-s3-repository/117549/2 "2018-01-29T23:54:56Z")

</div>

I added s3 endpoint to elastiocsearch.yml and now I get this:

Failed to check if blob [master.dat-temp] exist

{  
"error": {  
"root\_cause": [  
{  
"type": "blob\_store\_exception",  
"reason": "Failed to check if blob [master.dat-temp] exists"  
}  
],  
"type": "blob\_store\_exception",  
"reason": "Failed to check if blob [master.dat-temp] exists",  
"caused\_by": {  
"type": "amazon\_s3\_exception",  
"reason": "The bucket is in this region: us-east-1. Please use this region to retry the request (Service: Amazon S3; Status Code: 301; Error Code: 301 Moved Permanently; Request ID: 5A996C936C28E35D; S3 Extended Request ID: uFZZFKylZVEjsETrnFcSia66n1ehHoVYPJdyNqS9HF6XAaFJ2B/ak0LH4RAozOq5jaTgvkuS1Vo=)"  
}  
},

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [January 30, 2018, 4:50am UTC](https://discuss.elastic.co/t/fail-to-create-s3-repository/117549/3 "2018-01-30T04:50:59Z")

</div>

What endpoint did you configure? The error message means you have configured a different endpoint than the region the bucket exists in. I'm also curious why you are setting endpoint at all; it should work without it.

---

<div class="post-metadata">

**Author:** ![smithomega](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@smithomega](https://discuss.elastic.co/u/smithomega)\
**Post date:** [January 30, 2018, 5:25pm UTC](https://discuss.elastic.co/t/fail-to-create-s3-repository/117549/4 "2018-01-30T17:25:43Z")

</div>

Ugh!! you are right.

The endpoint I placed in elasticsearch.yml was the wrong. Both in the json PUT and the yml I have the same endpoint now and the command succeeds. SUCCESS! Thank you!

{  
"type": "s3",  
"settings": {  
"endpoint": "[s3.us-east-1.amazonaws.com](http://s3.us-east-1.amazonaws.com)",  
"bucket": "dusty-buckets",  
"server\_side\_encryption": "true",  
"region": "us-east-1"  
}  
}  
{  
"acknowledged": true  
}

---

<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:** [February 27, 2018, 5:26pm UTC](https://discuss.elastic.co/t/fail-to-create-s3-repository/117549/5 "2018-02-27T17:26:14Z")

</div>

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