# Unable to do Cross Cluster Searching in AWS with Instances in Separate Regions

**URL:** <https://discuss.elastic.co/t/unable-to-do-cross-cluster-searching-in-aws-with-instances-in-separate-regions/252707>\
**Category:** Elasticsearch\
**Created:** [October 20, 2020, 3:20pm UTC](https://discuss.elastic.co/t/unable-to-do-cross-cluster-searching-in-aws-with-instances-in-separate-regions/252707 "2020-10-20T15:20:05Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jim1](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@jim1](https://discuss.elastic.co/u/jim1)\
**Post date:** [November 19, 2020, 4:16pm UTC](https://discuss.elastic.co/t/unable-to-do-cross-cluster-searching-in-aws-with-instances-in-separate-regions/252707/4 "2020-11-19T16:16:25Z")

</div>

I managed to figure it out by looking at the discussion here: [Elasticsearch EC2 setup across multiple regions](https://discuss.elastic.co/t/elasticsearch-ec2-setup-across-multiple-regions/9170/14). The solution is the last comment in the post.

In the elasticsearch.yml file for cluster 1, I added the following lines to the file:  
`network.publish_host: Cluster 1's public IP address`  
`discovery.zen.ping.unicast.hosts: ["Cluster 2's public IP address"]`

In the elasticsearch.yml file for cluster 2, I added the following lines of code:  
`network.publish_host: Cluster 2's public IP address`  
`discovery.zen.ping.unicast.hosts: ["Cluster 1's public IP address"]`

I then restarted elasticsearch and the clusters were able to see each other and connect to each other as remote clusters. From there I was able to cross cluster search on both clusters.

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-do-cross-cluster-searching-in-aws-with-instances-in-separate-regions/252707)._
