# Shard Allocation Awareness in ec2

**URL:** <https://discuss.elastic.co/t/shard-allocation-awareness-in-ec2/6152>\
**Category:** Elasticsearch\
**Created:** [December 13, 2011, 10:56pm UTC](https://discuss.elastic.co/t/shard-allocation-awareness-in-ec2/6152 "2011-12-13T22:56:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piavlo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/piavlo/32/1214_2.png) [@Piavlo](https://discuss.elastic.co/u/Piavlo)\
**Post date:** [December 13, 2011, 10:56pm UTC](https://discuss.elastic.co/t/shard-allocation-awareness-in-ec2/6152/1 "2011-12-13T22:56:36Z")

</div>

Hi,

I'm setting up elastic search cluster in ec2

This is the discovery configuration

discovery:  
type: ec2  
ec2:  
groups: elasticsearch  
host\_type: private\_ip  
availability\_zones: us-east-1a,us-east-1c,us-east-1d  
any\_group: false  
ping\_timeout: 5  
tag:  
stage: dev

Now

From the documentation it's not clear if Cluster module allocation  
awareness makes use of the fact that node is running in ec2 - which  
seems natural to do.

So the question is do I need to set routing.allocation.awareness  
explicitly like this:

cluster:  
name: dev  
routing.allocation.awareness:  
attributes: availability\_zone  
force.availability\_zone.values:  
us-east-1a,us-east-1c,us-east-1d

node:  
availability\_zone: us-east-1a

Or this could be simplified or completely omitted with same effect?  
Like specifying node.availability\_zone - seems to be unneeded - as we  
already know such info from the ec2 discovery module.

Thanks  
Alex

---

<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 6, 2017, 3:45am UTC](https://discuss.elastic.co/t/shard-allocation-awareness-in-ec2/6152/2 "2017-07-06T03:45:28Z")

</div>


