I'm trialing the AWS Elasticsearch service:
https://aws.amazon.com/elasticsearch-service/
Very easy to setup. Basically just hit deploy. I unfortunately can't get any of the Elasticsearch GUI's to connect (ElasticHQ, Elasticsearch Head) as CORS is not enabled in the AWS build, and there is no way to change the elasticsearch config, or install plugins that I can see.
Does anyone know how to change these options on AWS?
My workaround while still staying inside of the AWS ecosystem was to create an API using the API Gateway.
I created a new POST end point with the address of my elasticsearch instance, and then followed the following guide: CORS on AWS API Gateway to add CORS to this end point. This allowed my front end code to be able to make requests from a different domain.
In case it's useful to anyone else - you can disable CORS for testing purposes using a Chrome plugin.
ElasticHQ and Elasticsearch Head still won't work properly with AWS Elasticsearch though (at the time of writing) as they make calls to /_cluster/state
which is not currently one of the supported AWS ElasticSearch operations.
Disabling CORS and performing a GET
on /_cluster/state
returns
{
Message: "Your request: '/_cluster/state' is not allowed."
}
Some functionality still works in ElasticHQ but I'm unable to get Elasticsearch Head to work.
Like @Le3wood said, the workaround could be integrating with AWS ecosystem. Besides API gateway, using AWS Lambda also works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With