# Awareness configuration

**URL:** <https://discuss.elastic.co/t/awareness-configuration/358994>\
**Category:** Elasticsearch\
**Created:** [May 7, 2024, 8:45pm UTC](https://discuss.elastic.co/t/awareness-configuration/358994 "2024-05-07T20:45:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhonsouza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jhonsouza/32/134261_2.png) [@jhonsouza](https://discuss.elastic.co/u/jhonsouza)\
**Post date:** [May 7, 2024, 8:45pm UTC](https://discuss.elastic.co/t/awareness-configuration/358994/1 "2024-05-07T20:45:20Z")

</div>

```auto
ElasticSearch Version: 7.17.15
Kibana Version: 7.17.15

```

Hi, I'm trying to configure the awareness to try to reduce the AWS data transfer cost, but that isn't working. I configured the `node.att.zone` in each data node using as value the availability zone where the node is located, and in each master node I configured the `cluster.routing.allocation.awareness.attributes` as zone. The issue is when I increase or decrease the number of replica of the index, in the most case the ELK use an instance in other availability zone. I tried use  
`cluster.routing.allocation.awareness.force.zone.values`, but didn't work too. If someone here can help me, I appreciate.

```auto
Data node awareness configuration in elasticsearch.yaml
cluster.routing.allocation.awareness.force.zone.values: cluster_aws_zones
node.attr.zone: date_node_availability_zone

```

```auto
Master node awareness configuration in elasticsearch.yaml
cluster.routing.allocation.awareness.attributes: zone
cluster.routing.allocation.awareness.force.zone.values: cluster_aws_zones

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 8, 2024, 5:27am UTC](https://discuss.elastic.co/t/awareness-configuration/358994/2 "2024-05-08T05:27:36Z")

</div>

Shard allocation awareness is used to ensure that shards are spread out across the zones. This helps the cluster handle the failure of a complete availability zone as shards are spread out and still available.

If you are looking to locate all primaries and replicas within a single availability zone based on an attribute you should instead look at [shard allocation filtering](https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#cluster-shard-allocation-filtering). Note that this will leave your cluster susceptible to data loss if a complete availability zone was to fail or become available.
