# Discovery ec2 for elasticsearch 7.4.2

**URL:** https://discuss.elastic.co/t/discovery-ec2-for-elasticsearch-7-4-2/207159
**Category:** Elasticsearch
**Created:** [November 8, 2019, 7:29pm UTC](https://discuss.elastic.co/t/discovery-ec2-for-elasticsearch-7-4-2/207159 "2019-11-08T19:29:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Igor\_Golebiowski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_golebiowski/32/50997_2.png) [@Igor\_Golebiowski](https://discuss.elastic.co/u/Igor_Golebiowski)
#### Post date: [November 8, 2019, 7:29pm UTC](https://discuss.elastic.co/t/discovery-ec2-for-elasticsearch-7-4-2/207159/1 "2019-11-08T19:29:53Z")

</div>

Hi,

I'm trying to setup elasticsearch cluster on ECS on AWS. I'm able to start 3 elasticsearch nodes, each on separate host but I'm not able to connect those instances to one cluster. I've checked [https://medium.com/@devfire/deploying-the-elk-stack-on-amazon-ecs-dd97d671df06](https://medium.com/@devfire/deploying-the-elk-stack-on-amazon-ecs-dd97d671df06) this tutorial and everything works perfectly but it's for version 5.6.4, when I tried it with 7.4.0 or 7.4.2 it doesn't work. I went through discovery ec2 plugin documentation and I've updated the elasticsearch.yml file but it still does not work.

Here my lastest elasticsearch.yml file:  
cluster.name: "elasticsearch"  
node.name: ${HOSTNAME}  
network.host: _eth0_  
http.port: 9200  
transport.port: 9300  
network.publish\_host: _ec2:privateIp_  
transport.publish\_host: _ec2:privateIp_  
discovery.zen.minimum\_master\_nodes: 2  
discovery.seed\_providers: ec2  
bootstrap.memory\_lock: false  
discovery.ec2.endpoint: [ec2.eu-west-1.amazonaws.com](http://ec2.eu-west-1.amazonaws.com)  
discovery.ec2.tag.ElasticSearch: nonprod  
discovery.ec2.availability\_zones: eu-west-1a,eu-west-1b,eu-west-1c  
cluster.routing.allocation.awareness.attributes: aws\_availability\_zone  
discovery.ec2.host\_type: private\_ip

With this setup I was able to start 2 docker containers on one host and they connected to one cluster, but the idea is that we want to have elasticsearch node per host.

Any ideas what is wrong?

---

<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: [December 6, 2019, 7:29pm UTC](https://discuss.elastic.co/t/discovery-ec2-for-elasticsearch-7-4-2/207159/2 "2019-12-06T19:29:58Z")

</div>

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