Skip to content

Instantly share code, notes, and snippets.

@mnylen
Last active September 20, 2015 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnylen/979f1fbd59c1edd9182d to your computer and use it in GitHub Desktop.
Save mnylen/979f1fbd59c1edd9182d to your computer and use it in GitHub Desktop.
Checklist to get ElasticSearch cluster on AWS EC2 working

Checklist to get ElasticSearch cluster on AWS EC2 working

  • Install cloud-aws-plugin (https://github.com/elastic/elasticsearch-cloud-aws)

  • Give your EC2 instances IAM Instance Policy with permission to ec2:DescribeInstances. The plugin will automatically get correct access keys after this.

    • You should really do the above, but you can also just create a new IAM user and set up cloud.aws.access_key and cloud.aws.secret_key in elasticsearch.yml. But you really should create instance policy instead.
  • Set discovery.type: ec2 in elasticsearch.yml

  • REMEMBER to set cloud.aws.region in elasticsearch.yml to the region you are running your instances in. Otherwise discovery plugin might not find other cluster instances.

  • Use same security group for all cluster EC2 instances. It should allow:

    • Outbound connections. The discovery plugin needs this so it can use AWS API to find other nodes. NOTE: The instance launch wizard sets this up by default, but if you are using Terraform, make sure to manually set up this rule.

    • Incoming TCP 9300 from all machines in the same security group. This is needed so the discovery plugin can connect nodes it discovered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment