# Elasticsearch on AW ECS

**URL:** <https://discuss.elastic.co/t/elasticsearch-on-aw-ecs/201690>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [September 30, 2019, 6:20pm UTC](https://discuss.elastic.co/t/elasticsearch-on-aw-ecs/201690 "2019-09-30T18:20:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhruvbakshi](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dhruvbakshi](https://discuss.elastic.co/u/dhruvbakshi)\
**Post date:** [September 30, 2019, 6:20pm UTC](https://discuss.elastic.co/t/elasticsearch-on-aw-ecs/201690/1 "2019-09-30T18:20:29Z")

</div>

Hi @DavidTurner,

I have a couple of cases logged in with elasticsearch. This one was created recently (00390065) but still ties into the other ticket I have logged and we don't seem to be reaching anywhere. I'm not sure if you can dig into to look at the tickets but I will explain the issue here.

We are trying to do a POC for Elasticsearch on AWS ECS. For the POC-- 2 EC2 instances with 2 Elasticsearch nodes, one on each instance.  
I have a custom yml file (pasted below). I have installed ec2-discovery and s3-discovery plugin in the docker image. Initially I had dynamic port mapping on the host with application load balancer and then I tried static port mapping with 9200 and 9300 on host because I thought maybe because of dynamic port mapping the containers are not able to go across the EC2 instances, but both methods didn't work to form a cluster. For both the methods the elastic load balancer is registering targets as healthy. I can use load balancer url to reach the container but when I query for the nodes or health I only see 1 node in the cluster.

Here is the elasticsearch.yml file:

[cluster.name](http://cluster.name/): "elk-dhruv-test"  
bootstrap.memory\_lock: false  
network.host: 0.0.0.0  
network.publish\_host: _ec2:privateIp_  
transport.publish\_host: _ec2:privateIp_  
discovery.zen.hosts\_provider: ec2  
discovery.ec2.tag.ElasticSearch: nonprod  
discovery.ec2.endpoint: [ec2.us-east-1.amazonaws.com](http://ec2.us-east-1.amazonaws.com/)  
s3.client.default.endpoint: [s3.us-east-1.amazonaws.com](http://s3.us-east-1.amazonaws.com/)  
cloud.node.auto\_attributes: true  
cluster.routing.allocation.awareness.attributes: aws\_availability\_zone  
xpack.security.enabled: false

As you can see in the yml file, I'm using ElasticSearch=nonprod tag to identify the EC2 instances and i confirm the underlying EC2 instances are tagged with that value. I have also tried it without the load balancer.

Any ideas what I might be doing wrong?

Thanks,  
Dhruv

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [September 30, 2019, 11:56pm UTC](https://discuss.elastic.co/t/elasticsearch-on-aw-ecs/201690/2 "2019-09-30T23:56:01Z")

</div>

It's a little impolite to ping individual people to get their attention like you just did. I for one have no particular knowledge about your problem area, nor about ECS. I think it's best to continue to work with your support engineers who are more knowledgeable than I am. I have linked this post to your case so they are aware you raised this here.

---

<div class="post-metadata">

**Author:** ![dhruvbakshi](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dhruvbakshi](https://discuss.elastic.co/u/dhruvbakshi)\
**Post date:** [October 1, 2019, 5:36am UTC](https://discuss.elastic.co/t/elasticsearch-on-aw-ecs/201690/3 "2019-10-01T05:36:23Z")

</div>

Hi David,

I apologize for addressing you directly. Actually I saw your replies on this post ([Discovery with ECS, Dynamic Initial Master Nodes](https://discuss.elastic.co/t/discovery-with-ecs-dynamic-initial-master-nodes/183149/10)) and thought you knew what the issue could be and as for support engineers being knowledgeable, I totally understand what you are saying but I have cycled through 3 support engineers and a couple of weeks and have landed no where till now.  
I hope you understand where I'm coming from and the needs of an organization and also the fact that my managers know we have elasticsearch paid license and that I have been working with them for some time on the issue now.

---

<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:** [October 29, 2019, 5:47am UTC](https://discuss.elastic.co/t/elasticsearch-on-aw-ecs/201690/4 "2019-10-29T05:47:55Z")

</div>

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