Symptom
You changed an instance type, toggled an advanced setting or applied a service software update, and the domain has shown Processing (or Modifying in the API) for hours. Further changes are rejected, and the console says the domain is applying changes. Search and indexing may still work because the old nodes keep serving traffic. Capacity changes, version upgrades and security fixes are blocked until this change finishes.
Most of these changes run as a blue/green deployment. The service builds a new set of nodes, copies every shard across, moves traffic over and then removes the old nodes. A change gets stuck in one of two places: at validation, before anything is built, or at shard copying, when the data can't move.
1. Find out which stage it is in
DOMAIN=logs-prod
aws opensearch describe-domain --domain-name $DOMAIN \
--query 'DomainStatus.{Processing:Processing,State:DomainProcessingStatus,Change:ChangeProgressDetails,Pending:ModifyingProperties[].Name}'
aws opensearch describe-domain-change-progress --domain-name $DOMAIN \
--query 'ChangeProgressStatus.{Id:ChangeId,Status:Status,Config:ConfigChangeStatus,By:InitiatedBy,Stages:ChangeProgressStages[].[Name,Status,LastUpdated],Failures:ValidationFailures}'
InitiatedBy shows whether you started the change (CUSTOMER) or AWS did (SERVICE, for example a service software update). ConfigChangeStatus tells you which way to go:
ConfigChangeStatus | Meaning | What to do |
|---|---|---|
Validating | Pre-checks running | Wait a few minutes |
ValidationFailed | A pre-check failed. Nothing has been built yet | Read ValidationFailures, fix the cause, then retry, edit or cancel |
PendingUserInput | The change needs your input | Edit the change or cancel it |
ApplyingChanges | Blue/green is running | Check which stage it is in (below) |
Completed / Cancelled | Done | Nothing |
Stage names you will see in ChangeProgressStages: Validation, Creating a new environment, Provisioning new nodes, Traffic routing on new nodes, Copying shards to new nodes, Traffic routing on old nodes, Terminating nodes, Deleting older resources. Changes that don't need blue/green show Dynamic update. Stage names can change between service releases, so go by what your output says.
If Copying shards to new nodes hasn't moved for hours, the cluster can't relocate shards. Skip to section 3.
2. Fix validation failures
ValidationFailures returns a Code, a Message and a Severity. These are the codes you will see most often:
| Code | Cause | Fix |
|---|---|---|
RedCluster | Red indexes on the domain | Restore or delete the red indexes (section 3) |
InsufficientStorageCapacity | The new configuration can't hold the data | Choose bigger volumes or more nodes, or delete old indexes |
InsufficientInstanceCapacity | No capacity for that instance type | Choose another instance type |
InsufficientFreeIPsForSubnets | The VPC subnets can't hold a second set of nodes | Free up IPs or choose larger subnets |
KMSKeyNotEnabled | The encryption-at-rest KMS key is disabled | Re-enable the key now |
SecurityGroupNotFound / SubnetNotFound | A security group or subnet was deleted | Recreate it or update the VPC options |
ShardMovementBlocked | Allocation filters pin shards to named nodes | Remove index.routing.allocation.require._name |
TooManyRequests | The memory circuit breaker tripped | Reduce load, or scale up before you retry |
TooManyShards, MaxShardCountExceeded | Advisory warnings | Reduce shards, or accept the warning |
A blue/green deployment briefly runs both node sets side by side. A VPC domain therefore needs free IPs for both sets in its subnets. Check before you retry:
aws opensearch describe-domain --domain-name $DOMAIN --query 'DomainStatus.VPCOptions.SubnetIds' --output text \
| xargs aws ec2 describe-subnets --query 'Subnets[].[SubnetId,AvailabilityZone,AvailableIpAddressCount]' --output table --subnet-ids
Warnings with Severity: Warning can be overridden. Pass the code with --accepted-warnings on the update-domain-config call that retries the change. The acceptance applies to that one request only.
3. Shard copying stalled
Run these checks against the domain endpoint. With fine-grained access control and the internal user database you can use basic auth. With IAM you need SigV4 signing, which curl 7.75 and later supports:
EP=https://$(aws opensearch describe-domain --domain-name $DOMAIN --query 'DomainStatus.Endpoints.vpc || DomainStatus.Endpoint' --output text)
OSC() { curl -s --aws-sigv4 "aws:amz:${AWS_REGION}:es" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
-H "x-amz-security-token: $AWS_SESSION_TOKEN" "$EP$1"; }
OSC "/_cluster/health?pretty"
OSC "/_cat/shards?v&h=index,shard,prirep,state,unassigned.reason,node&s=state" | grep -v STARTED
OSC "/_cat/allocation?v"
OSC "/_cluster/allocation/explain?pretty"
| What you see | Cause | Fix |
|---|---|---|
RELOCATING count barely changing, high disk on old nodes | Large shards and throttled recovery | Wait. Avoid the change during peak traffic next time |
| Unassigned primaries, cluster red | Lost data or a corrupt index | Restore the index from a snapshot, or delete it if you can rebuild it |
allocation/explain mentions disk watermark | The new nodes are too small, or the disks are already near full | Delete old indexes. The next change needs bigger volumes |
allocation/explain mentions filter | Index allocation filters | Clear the filter on that index |
ClusterIndexWritesBlocked = 1 | Free storage hit the block threshold | Free space first, then let relocation continue |
Clear an allocation filter on one index:
curl -s --aws-sigv4 "aws:amz:${AWS_REGION}:es" --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
-H "x-amz-security-token: $AWS_SESSION_TOKEN" -H 'Content-Type: application/json' \
-X PUT "$EP/my-index-000123/_settings" -d '{"index.routing.allocation.require._name": null}'
To restore a red index from an automated snapshot, list what is in the repository. The repository is cs-automated, or cs-automated-enc on encrypted domains:
OSC "/_snapshot?pretty"
OSC "/_snapshot/cs-automated-enc/_all?pretty" | grep '"snapshot"' | tail -5
Caution
A restore fails while an open index with the same name exists. Before you delete a red index to restore it, check that the snapshot actually contains it and that nothing writes to it during the restore. Deleting an index can't be undone.
Watch the CloudWatch metrics in AWS/ES with dimensions DomainName and ClientId (your account ID) while the change runs: ClusterStatus.red, FreeStorageSpace, JVMMemoryPressure, Nodes.
aws cloudwatch get-metric-statistics --namespace AWS/ES --metric-name Nodes \
--dimensions Name=DomainName,Value=$DOMAIN Name=ClientId,Value=$(aws sts get-caller-identity --query Account --output text) \
--start-time $(date -u -d '-6 hours' +%FT%TZ) --end-time $(date -u +%FT%TZ) --period 300 --statistics Maximum
During blue/green, Nodes should roughly double and then drop back. If it stays doubled for many hours, the copy is still running or has stalled.
4. Cancel, or open a case
Check what would be rolled back before you cancel anything:
aws opensearch cancel-domain-config-change --domain-name $DOMAIN --dry-run
aws opensearch cancel-domain-config-change --domain-name $DOMAIN
The response lists CancelledChangeIds and, for each property, the CancelledValue and the ActiveValue it returns to. Cancelling works best while the change is at ValidationFailed or PendingUserInput. Once shards are moving, the service may not let you cancel. Service-initiated software updates and version upgrades generally can't be cancelled after they start.
If the cluster is green, nothing is unassigned and the stage hasn't changed for many hours, open an AWS Support case with the domain ARN and the ChangeId. Don't keep sending update-domain-config calls. They are rejected while the domain is processing and only clutter the history.
Warning
A domain that stays unusable for a long time can be isolated, and if it isn't fixed it can be deleted with its data. Check the current policy in the OpenSearch Service documentation. Treat a long-stuck production domain as an incident, not a ticket for next week.
Prevent it next time
Dry-run every change. Find out whether it triggers blue/green and run the validation checks without applying anything:
aws opensearch update-domain-config --domain-name $DOMAIN \ --cluster-config InstanceType=r7g.large.search,InstanceCount=6 \ --dry-run --dry-run-mode Verbose \ --query 'DryRunResults'DeploymentTypecomes back asBlue/Green,DynamicUpdate,NoneorUndetermined(the domain is still processing).Start from a healthy cluster. Begin only when the cluster is green, JVM memory pressure is comfortably below the breaker and free storage is well above the data you hold. Run changes in low-traffic hours.
Make one change at a time. Combining several dynamic changes in one request can trigger a blue/green deployment.
Leave headroom. Keep spare subnet IPs for a second node set and avoid a few oversized shards.
Use the right strategy for large clusters. Look at
DeploymentStrategyOptionswithCapacityOptimizedfor large clusters. The guidance mentions 30 or more data nodes, so check what it says for your domain.Alarm on the domain. Set alarms on
ClusterStatus.red,FreeStorageSpaceandAutomatedSnapshotFailureso the next change doesn't start from a broken state.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get