0
votes

According to Amazon documentation, AWS elasticsearch Service supports the API _cluster, but this command not working:

curl -XGET 'https://search-aa-kfrqt6kjja5w7asrt7hi.sa-east-1.es.amazonaws.com/_cluster/state?pretty'
{"Message":"Your request: '/_cluster/state' is not allowed."}

http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg-supported-operations.html

the cluster with template "allow open access to this domain"

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "*"
      },
      "Action": "es:*",
      "Resource": "arn:aws:es:sa-east-1:7183736:domain/aa-ca/*"
    }
  ]
}

Thank you for any help you can provide !

1

1 Answers

2
votes

Try to add application/json header: curl -H "Content-type:application/json" https://search-aa-kfrqt6kjja5w7asrt7hi.sa-east-1.es.amazonaws.com/_cluster/stats?pretty

Actually, I took a look at documentation and it does not show the /_cluster/state in supported operations.


Supported Amazon ES Operations:
...
/_cluster/health
/_cluster/settings for three properties (PUT only)
/_cluster/stats
...