Amazon Elasticsearch Service (ES) is a managed service to host Elasticsearch instances. To harden domain (cluster) data in case of unauthorized access, ES provides data-at-rest encryption if the Elasticsearch version is 5.1 or above. Enabling encryption at rest will help protect: * Indices * Logs * Swap files * Data in the application directory * Automated snapshots

Thus, if adversaries gain physical access to the storage medium, they cannot access the data.

Ask Yourself Whether

There is a risk if you answered yes to any of those questions.

Recommended Secure Coding Practices

It’s recommended to encrypt Elasticsearch domains that contain sensitive information. Encryption and decryption are handled transparently by ES, so no further modifications to the application are necessary.

Sensitive Code Example

For AWS::Elasticsearch::Domain:

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  Elasticsearch:
    Type: AWS::Elasticsearch::Domain
    Properties:
      EncryptionAtRestOptions:
        Enabled: false  # Sensitive, disabled by default

Compliant Solution

For AWS::Elasticsearch::Domain:

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  Elasticsearch:
    Type: AWS::Elasticsearch::Domain
    Properties:
      EncryptionAtRestOptions:
        Enabled: true

See