coding and cooking

Creating and configuring AWS Elasticsearch using v4 signature in a Rails application

It's easy to setup a Rails app to access an AWS Elasticsearch instance through version 4 signature. This are the versions of the resources used:

  • Ruby version 2.1.8
  • Rails version 3.2.22
  • gem elasticsearch-transport-aws4 version 2.0.0
  • gem faraday_middleware-aws-signers-v4 version 0.1.6

Creating the AWS Elasticsearch instance

It's very easy to create and configurate your AWS Elasticsearch instance. Just follow the steps below.

Enter your AWS Console and search for Elasticsearch

Following the image sequence below, search for Elasticsearch service on AWS:

  • Click in Services (the first menu button)

  • Enter 'elasticsearch' on the input and choose the 'Elasticsearch Service'

  • On Elasticsearch Service dashboard, click the button Create a new domain

Choose the instance configuration. Any doubts, just click in the question mark on right top - same line of the title, 'Configure cluster'.

  • Define the policy

Click in Modify access policy when changing or...

Read more