7

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?

Kong
  • 8,792
  • 15
  • 68
  • 98
  • This is more of an opinionated question and not fit for stackoverflow but heres my 2 cents. Get out of it. I used elasticsearch for a month and there are a lot of restrictions to using it as a service. I wrote a [blog post](http://kirankoduru.github.io/elasticsearch/moving-from-aws-elasticsearch-service.html) about it. Even support couldn't help me with setting up the IAM policies for my needs. –  Nov 13 '15 at 22:56
  • 1
    short answer : you can't and it sucks, amazon has been very quiet about upcomming features, seems to me the whole service was created/optimised for log since they put it on the analytics section. – draeron Dec 17 '15 at 19:45

3 Answers3

4

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.

Le3wood
  • 311
  • 2
  • 8
1

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.

1

Like @Le3wood said, the workaround could be integrating with AWS ecosystem. Besides API gateway, using AWS Lambda also works.

Jason Kang
  • 21
  • 2