Other Articles

OpenSearch Domain – Enable Encryption at Rest

Secure Configuration Checks > AWS

This check ensures that encryption at rest is enabled for Amazon OpenSearch Service domains. With encryption at rest, the data stored for the domain, such as indexes and automated snapshots, is encrypted with an AWS KMS key. Without it, anyone who gets access to the underlying storage can read the data.

Check Details

  • Resource: OpenSearch Service Domain
  • Check: Enable OpenSearch domain encryption at rest (EncryptionAtRestEnabled)
  • Risk: Data on the domain storage and in its snapshots can be read in clear text if the storage is accessed or copied

Remediation via AWS Console

  1. Log in to the AWS Management Console and open the Amazon OpenSearch Service console.

    Amazon OpenSearch Service Console
  2. In the left navigation pane, click Domains and select the affected domain.
  3. Open the Security configuration tab and click Edit.

    OpenSearch domain security configuration tab
  4. Under Encryption, select Enable encryption of data at rest. Choose Use AWS owned key or select your own KMS key.

    Enable encryption of data at rest for an OpenSearch domain
  5. Click Save changes. Wait until the domain status is Active and the change is complete.
  6. Repeat steps 2 to 5 for every domain without encryption at rest.

Remediation via AWS CLI

  1. Log in to the AWS Management Console and click the CloudShell icon (>_) in the top-right corner.

    AWS CloudShell
  2. List the domains where encryption at rest is not enabled. The output shows the domain name and the setting:

    for d in $(aws opensearch list-domain-names \
      --query 'DomainNames[].DomainName' --output text); do
      aws opensearch describe-domain --domain-name "$d" \
        --query 'DomainStatus.[DomainName,EncryptionAtRestOptions.Enabled]' \
        --output text
    done | awk '$2 != "True"'
    

    The command covers one region. Add --region <region> to each aws command to check another.

  3. Enable encryption at rest with your KMS key:

    aws opensearch update-domain-config \
    --domain-name <domain-name> \
    --encryption-at-rest-options Enabled=true,KmsKeyId=<kms-key-arn>
    

    To use the AWS managed key instead, leave out KmsKeyId:

    aws opensearch update-domain-config \
    --domain-name <domain-name> \
    --encryption-at-rest-options Enabled=true
    
  4. Check the progress. Wait until Processing is False:

    aws opensearch describe-domain \
    --domain-name <domain-name> \
    --query 'DomainStatus.Processing'
    
  5. Verify the setting:

    aws opensearch describe-domain \
    --domain-name <domain-name> \
    --query 'DomainStatus.EncryptionAtRestOptions'
    

    Enabled must be true.

Replace <domain-name> with the name of the domain, for example my-search-domain. Replace <kms-key-arn> with the ARN of your KMS key, for example arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. Repeat steps 3 to 5 for each domain that step 2 lists.

Updated on 04 November, 2026