Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Here’s how to update an Amazon Elasticsearch / OpenSearch domain to the latest service software using the AWS Management Console:
-
Sign in to AWS Console
- Go to: https://console.aws.amazon.com
- Choose the correct Region (top right) where your Elasticsearch/OpenSearch domain exists.
-
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.
-
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.
-
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”.
- On the domain details page, in the Overview (or General information) section, look for:
-
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.
-
Monitor the update progress
- Back on the domain details page, monitor:
- Service software status: should move from
Update available→Updating→Updated. - Cluster health and Node status for any issues.
- Service software status: should move from
- You can also look at CloudWatch metrics and Events on the domain page for any warnings or errors.
- Back on the domain details page, monitor:
-
Verify after completion
- Once Service software status shows
Updated(or similar) and domain status isActive/Available, confirm:- Service software version now shows the latest version.
- Applications can connect and queries/indexing work as expected.
- Once Service software status shows
-
Repeat for other domains
- If you have multiple domains, repeat steps 3–7 for each domain that shows a pending service software update.
Using CLI
Using CLI
Below are concise, step‑by‑step AWS CLI instructions to ensure an Amazon Elasticsearch (or OpenSearch) domain is using the latest service software.
Look at these fields in the output:
The response includes an Copy the
Key fields:
Confirm:
1. Prerequisites
- AWS CLI v2 installed and configured with credentials.
- Permissions on the identity you’re using:
es:DescribeElasticsearchDomaines:StartElasticsearchServiceSoftwareUpdatees:DescribeElasticsearchServiceSoftwareUpdate(optional, for checking status)
my-domain-name with your actual domain name below.2. Check current service software status
UpdateAvailable:truemeans 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.
UpdateAvailable is false, the domain is already on the latest service software.3. Start the service software update
IfUpdateAvailable is true, start the update:ServiceSoftwareOptions block; note the UpdateId:UpdateId.4. (Optional) Monitor the update progress
UseDescribeElasticsearchServiceSoftwareUpdate to track status:Status:IN_PROGRESS→COMPLETED(orFAILED).Description: additional info if there’s an issue.
Status is COMPLETED.5. Verify the domain is now on the latest service software
After completion:UpdateAvailableisfalse.CurrentVersionequalsNewVersion.UpdateStatusisCOMPLETED(orNOT_REQUIRED/ no pending update).
Using Python
Using Python
Below is a practical, step‑by‑step way to remediate “ElasticSearch Domains Should Use The Latest Service Software” in AWS using Python (boto3).
Run the script, monitor updates in:
1. Prerequisites
-
Install boto3 (if not already):
-
Configure AWS credentials (with permissions for Elasticsearch/OpenSearch):
- IAM policy must allow:
es:ListDomainNameses:DescribeElasticsearchDomaines:StartElasticsearchServiceSoftwareUpdate
- IAM policy must allow:
- Know your region (or loop through regions where you have domains).
2. Logic to Remediate
For each Elasticsearch domain:- Describe domain.
- Check
ServiceSoftwareOptions:- If
UpdateStatusisELIGIBLEorPENDING_UPDATE, start the update. - If
UpdateStatusisIN_PROGRESS, just log it. - If
ServiceSoftwareOptionsis not present (older domains/SDKs), skip or just log.
- If
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_domainperiodically to checkUpdateStatusuntil it becomesCOMPLETED.
Using Terraform
Using Terraform
YOUR_DOMAIN_NAMEwith your actual OpenSearch/Elasticsearch domain name.
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.
