# Getting AWS credentials from keystore for discovery-ec2 plugin?

**URL:** <https://discuss.elastic.co/t/getting-aws-credentials-from-keystore-for-discovery-ec2-plugin/87958>\
**Category:** Elasticsearch\
**Created:** [June 1, 2017, 5:30pm UTC](https://discuss.elastic.co/t/getting-aws-credentials-from-keystore-for-discovery-ec2-plugin/87958 "2017-06-01T17:30:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [June 1, 2017, 7:23pm UTC](https://discuss.elastic.co/t/getting-aws-credentials-from-keystore-for-discovery-ec2-plugin/87958/5 "2017-06-01T19:23:53Z")

</div>

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 🙂

---

_[View the full topic](https://discuss.elastic.co/t/getting-aws-credentials-from-keystore-for-discovery-ec2-plugin/87958)._
