Elasticsearch on AW ECS

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: "elk-dhruv-test"
bootstrap.memory_lock: false
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
s3.client.default.endpoint: 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?


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.

1 Like

Hi David,

I apologize for addressing you directly. Actually I saw your replies on this post (Discovery with ECS, Dynamic Initial Master Nodes) 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.

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