Authenticationedit

Elasticsearch Service supports and recommends key-based authentication for the API.

To obtain an API key:

  1. Log in to the Elasticsearch Service Console.
  2. Find your deployment on the home page in the Elasticsearch Service card and click the gear icon to access it directly. Or, select Elasticsearch Service to go to the deployments page to view all of your deployments.
  3. Under the Features tab, open the API keys page. Any keys currently associated with your account are listed.
  4. Select Generate API key.
  5. Provide a name and select Generate API key.
  6. Copy the generated API key and store it in a safe place. You can also download the key as a CSV file.

The API key has no expiration, so it may be used indefinitely. The API key has the same permissions as the API key owner. You may have multiple API keys for different purposes and you can revoke them when you no longer need them.

The API key needs to be supplied in the Authorization header of a request, in the following format:

Authorization: ApiKey $EC_API_KEY

To revoke an API key:

  1. Log in to the Elasticsearch Service Console.
  2. Find your deployment on the home page in the Elasticsearch Service card and click the gear icon to access it directly. Or, select Elasticsearch Service to go to the deployments page to view all of your deployments.
  3. Under the Features tab, open the API keys page. Any keys currently associated with your account are listed.
  4. Select the trash icon under the Revoke column for any keys that you want to delete.