# Update elasticsearch configuration on some ec2 instances

**URL:** <https://discuss.elastic.co/t/update-elasticsearch-configuration-on-some-ec2-instances/41568>\
**Category:** Elasticsearch\
**Created:** [February 12, 2016, 12:31am UTC](https://discuss.elastic.co/t/update-elasticsearch-configuration-on-some-ec2-instances/41568 "2016-02-12T00:31:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdaYang](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AdaYang](https://discuss.elastic.co/u/AdaYang)\
**Post date:** [February 12, 2016, 12:31am UTC](https://discuss.elastic.co/t/update-elasticsearch-configuration-on-some-ec2-instances/41568/1 "2016-02-12T00:31:32Z")

</div>

I am pretty new to aws stack. I setup a 3 nodes elasticsearch cluster by using cloudformation template. elasticsearch automatically set 2 nodes as master node, which is good. I want to scale up to 5 nodes with 3 nodes as master. Without specific setting, 4 nodes would be masters. I believe elasticsearch.yml needs specific setting to tell this node is a master node or not. But since the cloudformation is the same for all nodes, logic needs to be added to some of the nodes that there are 3 master nodes already, don't set itself as a master... which means nodes needs kinda communicate with each other while starting up.

Anybody have done something similar?

Thanks,

---

<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:** [July 5, 2017, 11:16pm UTC](https://discuss.elastic.co/t/update-elasticsearch-configuration-on-some-ec2-instances/41568/2 "2017-07-05T23:16:58Z")

</div>


