13
votes

https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html mentions that auto creation of index can be disabled by

Automatic index creation can be disabled by setting action.auto_create_index to false in the config file of all nodes.

How can this be done in Elasticsearch as a service using the Java AWSElasticsearchClient class or in any other way?

1
AWS Elasticsearch is quite a different beast where you don't get access to the node configuration. The only way to set that setting is via the elasticsearch.yml file on each node, but there's no way to access it as far as I know.Val

1 Answers

5
votes

It is presently not possible to do this through the console. There is no option in the Configure Domain screen (even under Advanced options)

What you can do is

   curl -X PUT "'https://<blah>.ca-central-1.es.amazonaws.com/_cluster/settings" -H 'Content-Type: application/json' -d'
{
    "persistent": {
        "action.auto_create_index": "false" 
    }
}
'

to set the cluster settings as documented in https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-index_.html#index-creation