I am trying to setup elasticsearch on 2 ec2 nodes. I have the plugin installed and my config has the following:
cloud:
aws:
access_key: KEY
secret_key: KEY
discovery:
type: ec2
ec2:
groups: security-group
They only discover if I have both this specified and an EIP assigned to each one. Why do I need an EIP assigned? A while ago I had a NAT instance and I did not need the EIP nor the cloud: etc in the config.
We had some issues with getting nodes within the cluster to see each other in an AWS EC2 setup. We were seeing a timeout issue as well. It turned out that we had added a self-reference to the security group (within the AWS console) in order to get the instances to see each other.
E.g. within the security group settings have the following entry:
Once we added this the discovery worked as expected.