Elasticsearch domain with encryption at rest disabled

Encrypt stored Elasticsearch indexes and related data, and protect separate copies as well.

Description

Encryption at rest protects indexes, application data and automated snapshots with a KMS key. Protect manual snapshot repositories and exported logs at their own destinations.

Potential impact

Someone who obtains unencrypted stored data could read sensitive customer documents or operational logs.

Remediation

Set EncryptionAtRestOptions.Enabled to true and supply an approved KmsKeyId. An existing Elasticsearch domain needs version 6.7 or later. If it uses UltraWarm or cold storage, move indexes you need to keep to hot storage and disable those tiers before enabling encryption. You can then re-enable the tiers. Verify the applied state and your recovery options. Encryption cannot be turned off on the same domain. If you use a customer managed key, restrict who can disable or delete it.

Examples

The second excerpt takes the actual key ID or ARN through EncryptionKeyId. Use an engine and instance type that support encryption. Configure search API authentication, access policies and networking separately.

Before

yaml
Parameters:
  ElasticsearchVersion:
    Type: String
Resources:
  ElasticsearchDomain:
    Type: AWS::Elasticsearch::Domain
    Properties:
      DomainName: test
      ElasticsearchVersion: !Ref ElasticsearchVersion
      ElasticsearchClusterConfig:
        InstanceType: t3.small.elasticsearch
      EncryptionAtRestOptions:
        Enabled: false
      EBSOptions:
        EBSEnabled: true
        VolumeSize: 20
        VolumeType: gp2

After

yaml
Parameters:
  ElasticsearchVersion:
    Type: String
  EncryptionKeyId:
    Type: String
Resources:
  ElasticsearchDomain:
    Type: AWS::Elasticsearch::Domain
    Properties:
      DomainName: test
      ElasticsearchVersion: !Ref ElasticsearchVersion
      ElasticsearchClusterConfig:
        InstanceType: t3.small.elasticsearch
      EncryptionAtRestOptions:
        Enabled: true
        KmsKeyId: !Ref EncryptionKeyId
      EBSOptions:
        EBSEnabled: true
        VolumeSize: 20
        VolumeType: gp2

References