Skip to main content
A DocumentDB cluster bills its instances every hour whether or not any application uses it. nOps finds accounts and regions where every DocumentDB cluster has done only background storage I/O for a month, and estimates the saving from deleting them while keeping a final snapshot.

Why it matters

Clusters for retired features, proofs of concept or old environments often keep running long after their last real query, and DocumentDB cannot be stopped for more than 7 days.

How nOps finds it

nOps reads the last 30 complete days of DocumentDB billing in each account and region. An account and region is flagged when its instances were billed on at least 28 of those days and every cluster there did fewer than 500,000 storage I/Os a day on average. Clusters on I/O-Optimized are left out, because their I/O is not billed. The saving is the instance, storage and I/O cost of the last 7 days, scaled to a month, minus the cost of keeping a final snapshot of the storage at the public backup rate. Accounts mostly on reserved instances or credits, and savings under $50 a month, are left out.

Before you start

Confirm with the owner that no application uses the cluster. Permission to snapshot and delete clusters.

How to implement

  1. Check CloudWatch DatabaseConnections and the opcounters metrics for each cluster: reads served from memory do not show up in billing.
  2. Confirm with the owner that the cluster can go.
  3. Delete the instances, then delete the cluster with a final snapshot (aws docdb delete-db-instance --db-instance-identifier INSTANCE, then aws docdb delete-db-cluster --db-cluster-identifier CLUSTER --final-db-snapshot-identifier CLUSTER-final).
  4. Remove the cluster from Terraform or CloudFormation so it is not recreated.

Risks and considerations

  • Low storage I/O does not prove nobody reads the data: reads served from cache cost no I/O. Check connections first.
  • Stopping is not an option for long: DocumentDB starts a stopped cluster again after 7 days.
  • To roll back, restore a new cluster from the final snapshot.

FAQs

A cluster with no application still does some background I/O. nOps treats activity below this level as background only.