# How to secure ES API access deployed as docker on AWS

**URL:** https://discuss.elastic.co/t/how-to-secure-es-api-access-deployed-as-docker-on-aws/202512
**Category:** Elasticsearch
**Tags:** docker
**Created:** [October 7, 2019, 10:11am UTC](https://discuss.elastic.co/t/how-to-secure-es-api-access-deployed-as-docker-on-aws/202512 "2019-10-07T10:11:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nir\_Sharabi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nir_sharabi/32/55468_2.png) [@Nir\_Sharabi](https://discuss.elastic.co/u/Nir_Sharabi)
#### Post date: [October 7, 2019, 10:11am UTC](https://discuss.elastic.co/t/how-to-secure-es-api-access-deployed-as-docker-on-aws/202512/1 "2019-10-07T10:11:25Z")

</div>

Hi,  
Lately we deployed ES docker in our AWS account and currently we are figure out how can we secure the API access considering the fact we are using basic licence of ES.  
We are using version 7.2

Best Regards,  
Nir Sharabi  
Developer  
Supplant

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [October 11, 2019, 11:10am UTC](https://discuss.elastic.co/t/how-to-secure-es-api-access-deployed-as-docker-on-aws/202512/2 "2019-10-11T11:10:44Z")

</div>

Have you checked [https://www.elastic.co/guide/en/elasticsearch/reference/7.2/configuring-tls-docker.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.2/configuring-tls-docker.html) ?

---

<div class="post-metadata">

### Author: ![Nir\_Sharabi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nir_sharabi/32/55468_2.png) [@Nir\_Sharabi](https://discuss.elastic.co/u/Nir_Sharabi)
#### Post date: [October 15, 2019, 11:46am UTC](https://discuss.elastic.co/t/how-to-secure-es-api-access-deployed-as-docker-on-aws/202512/3 "2019-10-15T11:46:43Z")

</div>

Thanks for the reply.  
I have already checked it and yet didn't find an answer to my question.  
I am running with single ES node as follow:  
**docker run -d -p 9200:9200 -e "discovery.type=single-node" -v esdata:/usr/share/elasticsearch/data [docker.elastic.co/elasticsearch/elasticsearch:7.3.2](http://docker.elastic.co/elasticsearch/elasticsearch:7.3.2)**  
and I am looking to add to this command the required credentials (user/pass).  
BTW, when I added '-e "xpack.security.enabled=true"' I got the following exception: "missing authentication credentials for REST request"

---

<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: [November 12, 2019, 11:46am UTC](https://discuss.elastic.co/t/how-to-secure-es-api-access-deployed-as-docker-on-aws/202512/4 "2019-11-12T11:46:56Z")

</div>

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