My Amazon Elasticsearch Service domain is out of storage space
Last updated: 2019-12-17
How can I increase the amount of available storage space on an Amazon Elasticsearch Service (Amazon ES) domain?
When you allocate storage to an Elasticsearch node, up to 20% of that space (20 GB) is reserved space. If the domain runs out of storage space, you might get an error, such as a ClusterBlockException. To resolve storage space issues:
- Increase the size of the domain's Amazon Elastic Block Store (Amazon EBS) volumes. Or, add more nodes to the domain.
- Reduce the amount of data stored in your domain by deleting unnecessary files, optimizing old indices, or reducing the domain's replica count.
Add more storage to your domain
If the domain uses Amazon EBS volumes for storage, increase the size of the EBS volumes. The maximum volume size depends on the node's Amazon Elastic Compute Cloud (Amazon EC2) instance type. If you can't increase the size of the EBS volumes, add additional nodes or scale up your domain.
If you're not using Amazon EBS volumes for storage, add additional nodes to your cluster configuration.
The Amazon CloudWatch FreeStorageSpace metric measures the amount of storage that's available on the Elasticsearch cluster. To receive notifications when storage space is low, configure CloudWatch alarms.
To see how much storage space is available on each node in the cluster, run the cat allocation command. Example:
Reduce the amount of data stored in your domain
The easiest and most effective way to reduce the amount of data on the domain is to delete unnecessary documents. Be sure to take a manual snapshot first. Here are some other options to consider:
- Reduce the domain's replica count. Be aware that this might reduce fault tolerance. It's a best practice to configure at least one replica for each index.
- Optimize old indices. For more information, see Get Started with Amazon Elasticsearch Service: How Many Shards Do I Need? Be aware that optimizing old indices might not result in a significant storage space increase.
- Use Curator to delete old indices. For more information, see Using Curator to Rotate Data in Amazon Elasticsearch Service.