Skip to main content

More Info:

ElasticSearch domains should be running the latest service software. ElasticSearch domains should be configured to run the latest service software which often contains security updates.

Risk Level

Low

Address

Operational Maturity, Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • AWS Well Architected Framework
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SOC2
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

Sure, here are the step by step instructions to remediate the misconfiguration “ElasticSearch Domains Should Use The Latest Service Software” for AWS using the AWS console:
  1. Open the AWS Management Console and navigate to the Amazon Elasticsearch Service dashboard.
  2. Select the Elasticsearch domain that you want to update.
  3. Click on the “Actions” button and select “Upgrade Elasticsearch Version”.
  4. In the “Upgrade Elasticsearch Version” dialog box, select the latest version of Elasticsearch that you want to upgrade to.
  5. Choose the “Schedule Upgrade” option to schedule the upgrade for a later time or choose the “Upgrade Immediately” option to upgrade Elasticsearch immediately.
  6. Review the upgrade details and click on the “Confirm” button to start the upgrade process.
  7. Wait for the upgrade process to complete. The Elasticsearch domain will be unavailable during the upgrade process.
  8. Once the upgrade process is complete, verify that the Elasticsearch domain is using the latest version of Elasticsearch.
That’s it! By following these steps, you can remediate the misconfiguration “ElasticSearch Domains Should Use The Latest Service Software” for AWS using the AWS console.

To remediate the misconfiguration “ElasticSearch Domains Should Use The Latest Service Software” for AWS using AWS CLI, follow these steps:
  1. Open the AWS CLI on your local machine.
  2. Run the following command to get the list of Elasticsearch domains in your AWS account:
  1. Identify the Elasticsearch domain that needs to be updated to the latest service software.
  2. Run the following command to get the details of the Elasticsearch domain:
Replace <domain-name> with the name of the Elasticsearch domain that needs to be updated.
  1. Check the value of the ElasticsearchVersion parameter in the output. If it is not the latest version, proceed to the next step.
  2. Run the following command to update the Elasticsearch domain to the latest service software:
Replace <domain-name> with the name of the Elasticsearch domain that needs to be updated. The --elasticsearch-version parameter should be set to the latest version available at the time of remediation. In this example, we have used version 7.10.
  1. Wait for the update to complete. You can check the status of the update by running the following command:
Replace <domain-name> with the name of the Elasticsearch domain that was updated.
  1. Verify that the Elasticsearch domain is now using the latest service software by checking the value of the ElasticsearchVersion parameter in the output of the describe-elasticsearch-domain command.
With these steps, you have successfully remediated the misconfiguration “ElasticSearch Domains Should Use The Latest Service Software” for AWS using AWS CLI.
To remediate the misconfiguration of ElasticSearch Domains Should Use The Latest Service Software in AWS using python, you can follow the below steps:
  1. Import the necessary Python libraries: boto3 and json.
  1. Create an AWS ElasticSearch client using boto3.
  1. Get the list of all Elasticsearch domains in the account using the list_domain_names() method.
  1. Loop through each domain and check if the domain is using the latest service software version. You can get the latest Elasticsearch version using the describe_elasticsearch_version() method.
  1. Finally, run the Python script to remediate the misconfiguration in AWS ElasticSearch domains.
Note: You need to have appropriate AWS credentials configured in your environment to run this script.
  • Set LATEST_COMPATIBLE_VERSION to the exact version you selected from aws es get-compatible-elasticsearch-versions (the same value you would pass to --target-version in aws es upgrade-elasticsearch-domain).
  • Important: In the current AWS provider, changing engine_version on aws_elasticsearch_domain forces resource replacement (destroy and recreate the domain). This is not reversible and can cause downtime and/or data loss if you are not also managing snapshots and data restore separately. The warnings from the CLI remediation still apply: review breaking changes, ensure recent snapshots, and expect a potentially long upgrade window.
Verification with Terraform:
  • terraform plan should show a -/+ change for aws_elasticsearch_domain.this with engine_version changing from the current version to LATEST_COMPATIBLE_VERSION, indicating the domain will be replaced with the new service software version.

Additional Reading: