# S3-repository deprecated settings warning

**URL:** <https://discuss.elastic.co/t/s3-repository-deprecated-settings-warning/92354>\
**Category:** Elasticsearch\
**Created:** [July 8, 2017, 7:59am UTC](https://discuss.elastic.co/t/s3-repository-deprecated-settings-warning/92354 "2017-07-08T07:59:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yee/32/12782_2.png) [@yee](https://discuss.elastic.co/u/yee)\
**Post date:** [July 8, 2017, 7:59am UTC](https://discuss.elastic.co/t/s3-repository-deprecated-settings-warning/92354/1 "2017-07-08T07:59:17Z")

</div>

Hi,  
I created a snapshot in ElasticSearch 5.4.3, according to [https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-repository.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-repository.html) , my cmd as below:

```bash
curl -XPUT 'http://localhost:9200/_snapshot/s3_repository' -d '{
    "type": "s3",
    "settings": {
        "access_key": "***",
        "secret_key": "***",
        "bucket": "es-snapshots",
        "region": "cn-north-1",
        "base_path": "Elasticsearch",
        "max_retries": 3
    }
}'

```

But ElasticSearch writes lots of WARNING logs out:

```auto
[2017-07-08T15:28:52,770][WARN][org.elasticsearch.deprecation.common.settings.Setting] [region] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
[2017-07-08T15:28:52,771][WARN][org.elasticsearch.deprecation.repositories.s3.InternalAwsS3Service] Specifying region for an s3 repository is deprecated. Use endpoint to specify the region endpoint if the default behavior is not sufficient.
[2017-07-08T15:28:52,773][WARN][org.elasticsearch.deprecation.repositories.s3.InternalAwsS3Service] Using s3 access/secret key from repository settings. Instead store these in named clients and the elasticsearch keystore for secure settings.
[2017-07-08T15:28:52,787][WARN][org.elasticsearch.deprecation.common.settings.Setting] [access_key] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
[2017-07-08T15:28:52,787][WARN][org.elasticsearch.deprecation.common.settings.Setting] [secret_key] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.

```

I wonder what's wrong with my operations, or the doc needs to be updated?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 8, 2017, 8:13am UTC](https://discuss.elastic.co/t/s3-repository-deprecated-settings-warning/92354/2 "2017-07-08T08:13:25Z")

</div>

Doc needs an update.

You should start using `endpoint` instead.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 8, 2017, 8:20am UTC](https://discuss.elastic.co/t/s3-repository-deprecated-settings-warning/92354/3 "2017-07-08T08:20:12Z")

</div>

You should also start using the keystore to store credentials.

> **[Secure Settings | Elasticsearch Reference \[5.5\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/secure-settings.html#creating-keystore)**

Then add your secure settings as:

```auto
s3.client.default.access_key
s3.client.default.secret_key

```

See

> [@Getting AWS credentials from keystore for discovery-ec2 plugin?](https://discuss.elastic.co/t/getting-aws-credentials-from-keystore-for-discovery-ec2-plugin/87958/5):
>
> I see. Sadly the documentation has not been updated yet. It needs to be: discovery.ec2.access\_key discovery.ec2.secret\_key cloud.aws.region should not be used anymore but discovery.ec2.endpoint needs to be set in elasticsearch.yml file. See [https://github.com/elastic/elasticsearch/blob/5.4/plugins/discovery-ec2/src/main/java/org/elasticsearch/discovery/ec2/AwsEc2Service.java#L181-L188](https://github.com/elastic/elasticsearch/blob/5.4/plugins/discovery-ec2/src/main/java/org/elasticsearch/discovery/ec2/AwsEc2Service.java#L181-L188) I hope this helps. cc @rjernst in case I'm saying something wrong slight_smile

And

> [@Getting AWS credentials from keystore for discovery-ec2 plugin?](https://discuss.elastic.co/t/getting-aws-credentials-from-keystore-for-discovery-ec2-plugin/87958/11):
>
> The different keystore settings did affect the result, now able to create bucket. Here is keystore list output: /mnt/elasticsearch# bin/elasticsearch-keystore list discovery.ec2.access\_key discovery.ec2.secret\_key s3.client.default.access\_key s3.client.default.secret\_key Here is result of running shell script to create the repository bucket: /mnt/elasticsearch# bin/s3-repo-create.sh es-lineartv\_test {"acknowledged":true}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 8, 2017, 8:38am UTC](https://discuss.elastic.co/t/s3-repository-deprecated-settings-warning/92354/4 "2017-07-08T08:38:32Z")

</div>

I opened the following issue:

> <https://github.com/elastic/elasticsearch/issues/25619>

---

<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:** [August 5, 2017, 8:38am UTC](https://discuss.elastic.co/t/s3-repository-deprecated-settings-warning/92354/5 "2017-08-05T08:38:43Z")

</div>

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