Samuel Hawksby-Robinson
Samuel Hawksby-Robinson

Reputation: 2741

Error Updating AWS Elasticsearch Settings Via Command Line

I'm attempting to update the settings of an AWS Elasticsearch instance. My command is :

curl -XPUT "https://<index-endpoint>.es.amazonaws.com/_settings" -d @/path/to/settings.json

And I receive the following response:

{
    "Message":"Your request: '/_settings' is not allowed."
}

I've read that not all ES commands are not accepted by an AWS instance of ES, but I can't find an alternative for what I'm doing.


Note:

My settings are as follows:

{
    "index" : {
        "number_of_shards" : "5",
        "number_of_replicas" : "1",
        "analysis": {
            "analyzer": {
                "urls-links-emails": {
                    "type": "custom",
                    "tokenizer": "uax_url_email"
                }
            }
        }
    }
}

Upvotes: 0

Views: 626

Answers (1)

Val
Val

Reputation: 217324

You need to apply those settings to a specific index, so your endpoint needs to be something like https://<index-endpoint>.es.amazonaws.com/myindex/_settings

More concretely, your command needs to be like this:

curl -XPUT https://<index-endpoint>.es.amazonaws.com/myindex/_settings --data-binary @/path/to/settings.json

Upvotes: 3

Related Questions