Skip to main content

Triage and Remediation

Remediation

Using Console

Here’s how to update an Amazon Elasticsearch / OpenSearch domain to the latest service software using the AWS Management Console:
  1. Sign in to AWS Console
  2. Open the OpenSearch Service console
    • In the search bar at the top, type “OpenSearch” (older accounts may still say “Elasticsearch Service”).
    • Click Amazon OpenSearch Service.
  3. Go to your domain
    • In the left navigation pane, click Domains.
    • Find and click the name of the Elasticsearch/OpenSearch domain you want to update.
  4. Check service software status
    • On the domain details page, in the Overview (or General information) section, look for:
      • Service software version
      • Service software status (e.g., Available, Update available, Update scheduled, etc.)
    • If an update is available, you’ll see a message like “A new service software update is available” and a button or link such as “Update” or “Service software updates”.
  5. Start the service software update
    • Click Service software updates (or Update depending on UI).
    • Review the details of the update (release notes / impact).
    • Choose between options (UI text may vary slightly by region/version):
      • Start update now – initiates update as soon as possible.
      • In some UIs, you may have options to:
        • Allow blue/green deployment (preferred if available, to reduce downtime).
        • Schedule or control maintenance window (if configured).
    • Confirm by clicking Update / Start update.
  6. Monitor the update progress
    • Back on the domain details page, monitor:
      • Service software status: should move from Update availableUpdatingUpdated.
      • Cluster health and Node status for any issues.
    • You can also look at CloudWatch metrics and Events on the domain page for any warnings or errors.
  7. Verify after completion
    • Once Service software status shows Updated (or similar) and domain status is Active/Available, confirm:
      • Service software version now shows the latest version.
      • Applications can connect and queries/indexing work as expected.
  8. Repeat for other domains
    • If you have multiple domains, repeat steps 3–7 for each domain that shows a pending service software update.
That’s all that’s required via the console to ensure your Elasticsearch/OpenSearch domains are using the latest service software.
Below are concise, step‑by‑step AWS CLI instructions to ensure an Amazon Elasticsearch (or OpenSearch) domain is using the latest service software.

1. Prerequisites

  • AWS CLI v2 installed and configured with credentials.
  • Permissions on the identity you’re using:
    • es:DescribeElasticsearchDomain
    • es:StartElasticsearchServiceSoftwareUpdate
    • es:DescribeElasticsearchServiceSoftwareUpdate (optional, for checking status)
Replace my-domain-name with your actual domain name below.

2. Check current service software status

Look at these fields in the output:
  • UpdateAvailable: true means a newer service software is available.
  • CurrentVersion: currently running service software version.
  • NewVersion: version you will be upgraded to.
  • UpdateStatus: e.g. PENDING_UPDATE, IN_PROGRESS, COMPLETED, etc.
If UpdateAvailable is false, the domain is already on the latest service software.

3. Start the service software update

If UpdateAvailable is true, start the update:
The response includes an ServiceSoftwareOptions block; note the UpdateId:
Copy the UpdateId.

4. (Optional) Monitor the update progress

Use DescribeElasticsearchServiceSoftwareUpdate to track status:
Key fields:
  • Status: IN_PROGRESSCOMPLETED (or FAILED).
  • Description: additional info if there’s an issue.
You can loop or periodically run that command until Status is COMPLETED.

5. Verify the domain is now on the latest service software

After completion:
Confirm:
  • UpdateAvailable is false.
  • CurrentVersion equals NewVersion.
  • UpdateStatus is COMPLETED (or NOT_REQUIRED / no pending update).
At this point, the Elasticsearch/OpenSearch domain is using the latest service software.
Below is a practical, step‑by‑step way to remediate “ElasticSearch Domains Should Use The Latest Service Software” in AWS using Python (boto3).

1. Prerequisites

  1. Install boto3 (if not already):
  2. Configure AWS credentials (with permissions for Elasticsearch/OpenSearch):
    • IAM policy must allow:
      • es:ListDomainNames
      • es:DescribeElasticsearchDomain
      • es:StartElasticsearchServiceSoftwareUpdate
    Example minimal IAM permissions:
  3. Know your region (or loop through regions where you have domains).

2. Logic to Remediate

For each Elasticsearch domain:
  1. Describe domain.
  2. Check ServiceSoftwareOptions:
    • If UpdateStatus is ELIGIBLE or PENDING_UPDATE, start the update.
    • If UpdateStatus is IN_PROGRESS, just log it.
    • If ServiceSoftwareOptions is not present (older domains/SDKs), skip or just log.

3. Python Script (boto3)

This script:
  • Lists all Elasticsearch domains in a region.
  • Checks which need software updates.
  • Starts the update where applicable.

4. Optional: Target a Single Domain

If you only want to update one specific domain:

Run the script, monitor updates in:
  • AWS Console → Amazon OpenSearch Service / Elasticsearch → your domain → “Service software”, or
  • Use describe_elasticsearch_domain periodically to check UpdateStatus until it becomes COMPLETED.
Substitute:
  • YOUR_DOMAIN_NAME with your actual OpenSearch/Elasticsearch domain name.
This change is in-place and does not force replacement of the domain, but may cause AWS-managed maintenance windows when service software is applied.Note: Terraform cannot directly trigger an immediate service software update (the AWS API call is StartElasticsearchServiceSoftwareUpdate / StartOpensearchServiceSoftwareUpdate and is a runtime action). To remediate “use latest service software” now, you must start the update via AWS Console or CLI, then use Terraform as above to ensure future updates are applied automatically.Verification: terraform plan should show software_update_options.auto_software_update_enabled changing from false (or unset) to true on the aws_opensearch_domain resource.