Skip to content

Can I decrease the EBS volume size on my Amazon OpenSearch Service domain?

6 minute read
Content level: Intermediate
0

The Amazon EBS documentation states that volume size can only be increased, not decreased. This article explains whether the same constraint applies to Amazon OpenSearch Service domains, why the answer differs, and how to safely decrease the EBS volume size on a domain.

Short answer

Yes. You can decrease the EBS volume size on an Amazon OpenSearch Service domain. When you submit the change, the service runs a blue/green deployment, provisions a new cluster with the smaller volume, migrates your data, and switches traffic to the new cluster. You are not shrinking an existing volume in place — you are moving to a new cluster that uses a smaller volume. That is why the raw-EBS "no size decrease" constraint does not apply. The change runs without downtime.

Why Amazon OpenSearch Service allows this

A raw Amazon EBS volume cannot be reduced in size after creation (Request EBS volume modifications). Amazon OpenSearch Service, however, uses a blue/green deployment for most configuration changes. With this approach, when you request a smaller EBS volume, the service does the following:

  1. Creates an idle (green) environment with the new configuration, including the smaller volume.
  2. Copies data from the current (blue) environment to the green environment.
  3. Switches client traffic to the green environment.
  4. Terminates the blue environment, including the original larger volumes.

In other words, OpenSearch Service replaces the cluster with one that has a smaller volume rather than resizing the existing volume. "Decreasing the EBS volume size" is explicitly listed in Changes that usually cause blue/green deployments.

How to decrease the volume size

Prerequisites

Before you submit the change, confirm the following:

  1. The new volume size must be able to hold your current data. If the new total storage is smaller than your current index data size, the change is rejected at the validation stage with InsufficientStorageCapacity. As a general rule, plan so that each node retains at least the recommended free space threshold (20 percent of available storage, or 20 GB, whichever is larger — see Troubleshoot low storage space).
  2. The minimum EBS volume size depends on the instance type. You cannot go below the minimum supported by your node's instance type. For the exact limits, see Amazon OpenSearch Service quotas — EBS volume size quotas.
  3. At least six hours must have passed since the last EBS-related change. If your previous EBS change is still in progress or occurred less than six hours ago, the new request can be rejected or trigger an additional blue/green deployment.
  4. The cluster must be healthy. Validation can fail if the cluster status is red or if shards are pinned to specific nodes.

Validate the change before you apply it (recommended)

Use a dry run to confirm the change will be accepted.

Console:

  1. In the OpenSearch Service console, select your domain, choose Actions, and then choose Edit cluster configuration.
  2. Change the EBS volume size to the smaller target value.
  3. Under Dry run analysis, choose Run.
  4. Confirm that the result shows a Blue/Green deployment type and no validation errors.

AWS CLI:

aws opensearch update-domain-config \ --domain-name <domain-name> \ --ebs-options 'EBSEnabled=true,VolumeType=gp3,VolumeSize=<new-size>' \ --dry-run \ --dry-run-mode Verbose

For more details, see Determining whether a change will cause a blue/green deployment.

Apply the change

Console:

  1. In the OpenSearch Service console, select your domain, choose Actions, and then choose Edit cluster configuration.
  2. In the Storage section, change EBS storage size per node to the smaller target value.
  3. Save your changes.

AWS CLI:

aws opensearch update-domain-config \ --domain-name <domain-name> \ --ebs-options 'EBSEnabled=true,VolumeType=gp3,VolumeSize=<new-size>,Iops=<iops>,Throughput=<throughput>'

Track progress

After you submit the change, the domain enters a Modifying state and the blue/green deployment starts.

aws opensearch describe-domain-change-progress \ --domain-name <domain-name>

The change moves through the following stages: ValidationCreating a new environmentProvisioning new nodesCopying shards to new nodesTerminating nodesDeleting older resources.

How long the change takes depends on your data size, node count, shard count, and cluster load. The process typically takes several hours. During this time, the domain continues to serve search and indexing traffic.

Performance impact during the change

The blue/green deployment runs without downtime, but you might see temporary impact (Performance impact of blue/green deployments):

  • Increased load on leader nodes while the old and new nodes run in parallel.
  • Higher search and indexing latency while data is copied.
  • Some requests may be rejected under cluster load.

To minimize this impact, start the change during a low-traffic window.

Charges

If you do not also change the instance type, you are charged for the larger (original) cluster for the first hour, and only for the new (smaller) cluster afterward (Charges for configuration changes).

Common validation failures

Error codeMeaningWhat to do
InsufficientStorageCapacityThe new configuration cannot hold the current data.Delete unused indexes, or move data to a lower tier (UltraWarm or cold) before you retry.
RedClusterThe cluster status is red.Resolve the red-cluster condition — see Troubleshoot a red or yellow cluster.
TooManyRequestsSearch or write traffic is too high for the change to proceed.Retry during a low-traffic window.
ShardMovementBlockedOne or more indexes are pinned to specific nodes.Clear the pinning by setting index.routing.allocation.require._name to null.

For the complete list, see Troubleshooting validation errors.

Best practices

  • Take a manual snapshot first. Data-loss risk is low because the change runs as a blue/green deployment, but a fresh manual snapshot is always a safe pre-change step.
  • Start the change during a low-traffic window.
  • Monitor FreeStorageSpace before and after the change.
  • Leave enough headroom after the change. If free space is too tight for your growth rate, you can hit ClusterIndexWritesBlocked later. A common guideline is to keep at least 1.5–2× your current data size as capacity.
  • Do not combine the size decrease with other changes (instance type, volume type, and so on) in the same request. Isolating the change makes troubleshooting easier if something goes wrong.

Related information

AWS
SUPPORT ENGINEER
published 25 days ago93 views