# ES 6.5.4 and S3 repo issue

**URL:** <https://discuss.elastic.co/t/es-6-5-4-and-s3-repo-issue/164779>\
**Category:** Elasticsearch\
**Created:** [January 18, 2019, 11:12am UTC](https://discuss.elastic.co/t/es-6-5-4-and-s3-repo-issue/164779 "2019-01-18T11:12:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phr0gz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phr0gz/32/9454_2.png) [@phr0gz](https://discuss.elastic.co/u/phr0gz)\
**Post date:** [January 18, 2019, 11:12am UTC](https://discuss.elastic.co/t/es-6-5-4-and-s3-repo-issue/164779/1 "2019-01-18T11:12:57Z")

</div>

Hello,

We are trying to use the repository-s3 on our ES servers. but when we are trying to create a repository with:

> PUT \_snapshot/s3  
> {  
> "type": "s3",  
> "settings": {  
> "endpoint": "elasticsearch.is.working.in.the.lab.local:8082"  
> }  
> }

OR

> PUT \_snapshot/s3  
> {  
> "type": "s3",  
> "settings": {  
> "bucket": "elasticsearch"  
> }  
> }

We have the following error:  
`Method Not Allowed (Service: Amazon S3; Status Code: 405; Error Code: 405 Method Not Allowed; Request ID: 168843073; S3 Extended Request ID: null)`

In elasticsearch.yml the following line is added:  
`s3.client.default.endpoint: "elasticsearch.is.working.in.the.lab.local:8082"`

And credential has been added in the keystore via:  
`bin/elasticsearch-keystore add s3.client.default.access_key`  
`bin/elasticsearch-keystore add s3.client.default.secret_key`

**The s3cmd is working:**  
New settings:  
Access Key: MYACCESSKEY  
Secret Key: MYSECRETKEY  
Default Region: US  
S3 Endpoint: elasticsearch.is.working.in.the.lab.local:8082  
DNS-style bucket+hostname:port template for accessing a bucket: elasticsearch.is.working.in.the.lab.local:8082  
Encryption password:  
Path to GPG program: /usr/bin/gpg  
Use HTTPS protocol: True  
HTTP Proxy server name:  
HTTP Proxy server port:

**And the result of 's3cmd ls' is:**  
`2019-01-17 13:58 s3://elasticsearch`

Is there anyway to troubleshoot that? Should I open a support request?

Thanks,

L.

---

<div class="post-metadata">

**Author:** ![Tek\_Chand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tek_chand/32/34318_2.png) [@Tek\_Chand](https://discuss.elastic.co/u/Tek_Chand)\
**Post date:** [January 18, 2019, 11:34am UTC](https://discuss.elastic.co/t/es-6-5-4-and-s3-repo-issue/164779/2 "2019-01-18T11:34:41Z")

</div>

@phr0gz,

Please try to use the below pattern to create s3 repository:

```auto
PUT /_snapshot/s3_repository
{
  "type": "s3",
  "settings": {
    "bucket": "MYBUCKETNAME",
    "region": "xyz",
  }
}'

```

You also need to install `repository-s3` plugin on your all elasticsearch node.

You need to store the `access-key` and `secret-key` securely using elasticsearch-keystore.

Please refer the below link for same:

[https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-client.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-client.html)

Thanks.

---

<div class="post-metadata">

**Author:** ![phr0gz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phr0gz/32/9454_2.png) [@phr0gz](https://discuss.elastic.co/u/phr0gz)\
**Post date:** [January 18, 2019, 12:42pm UTC](https://discuss.elastic.co/t/es-6-5-4-and-s3-repo-issue/164779/3 "2019-01-18T12:42:36Z")

</div>

Thanks, but the region setting has been removed see [S3 Repository: Remove region setting by rjernst · Pull Request #22853 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/pull/22853).  
The S3 plugin is installed on all nodes.

As I said before:

> [@phr0gz](#):
>
> And credential has been added in the keystore via:  
> `bin/elasticsearch-keystore add s3.client.default.access_key`  
> `bin/elasticsearch-keystore add s3.client.default.secret_key`

---

<div class="post-metadata">

**Author:** ![Tek\_Chand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tek_chand/32/34318_2.png) [@Tek\_Chand](https://discuss.elastic.co/u/Tek_Chand)\
**Post date:** [January 21, 2019, 4:40am UTC](https://discuss.elastic.co/t/es-6-5-4-and-s3-repo-issue/164779/4 "2019-01-21T04:40:39Z")

</div>

@phr0gz,

Thanks for info. I was not aware about this.

> [@phr0gz](#):
>
> but the region setting has been removed

I will check your error again and try to come back with solution.

Thanks.

---

<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 18, 2019, 4:40am UTC](https://discuss.elastic.co/t/es-6-5-4-and-s3-repo-issue/164779/5 "2019-02-18T04:40:42Z")

</div>

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