Skip to content
Cloud Efficiency Hub

Inactive DocumentDB Cluster

The short version

Amazon DocumentDB instance-based clusters bill every instance for each second it runs, whether or not any client is connected, and storage, I/O and backup storage are billed on top.

PointFive Research

Cloud cost research at PointFive

AWS service
AWS DocumentDB
Category
Databases
Reference
CER-0375
Type
Idle or Unused Resource

Explanation

Why the waste happens and who it affects.

Clusters created to evaluate DocumentDB, to rehearse a MongoDB migration, or for services that were later retired are frequently left running with a primary and one or more replicas and no connections at all. DocumentDB Serverless clusters also keep billing capacity while idle, because capacity does not scale below the configured minimum.

Stopping is only a partial answer: a stopped DocumentDB cluster stops instance charges but still bills storage, manual snapshots and automated backup storage, and DocumentDB automatically starts it again after seven days, at which point instance charges resume. AWS Compute Optimizer produces idle recommendations for DocumentDB clusters that have had no database connections over its lookback period.

Billing model

The pricing dimensions that drive this cost.

Instance hours
Each instance is billed per second with a 10-minute minimum, from launch until it is stopped or deleted
Cluster storage and I/O
Storage billed per GB-month, plus I/O billed per million requests on the Standard storage configuration
Backup storage
Free up to 100 percent of the cluster's data storage, then billed per GB-month; manual snapshots persist after deletion
Serverless capacity
DocumentDB Serverless bills DocumentDB Capacity Units per second for capacity used, never below the configured minimum
Stopped cluster
No instance charges, but storage, manual snapshots and backup storage continue, and the cluster restarts after seven days

How to detect

4 checks to find it in your estate.

  • Review AWS Compute Optimizer idle recommendations for Amazon DocumentDB, which flag provisioned and serverless clusters in available status with no database connections over the 14-day default lookback (elastic clusters are excluded)
  • Check the DatabaseConnections CloudWatch metric (AWS/DocDB namespace, customer-initiated connections only) for every instance over 14 to 30 days, together with DocumentsReturned, DocumentsInserted, DocumentsUpdated and DocumentsDeleted; opcounter metrics are not a reliable idle signal because AWS notes they stay around 50 on idle clusters due to internal health checks
  • Look for clusters that are repeatedly stopped and automatically restarted after seven days, which indicates a cluster kept only in case it is needed
  • Confirm with owners, tags and application configuration that no service, migration job or DMS task still points at the cluster endpoint

How to fix

4 ways to remove the waste.

  • Take a final snapshot and delete the cluster and its instances when it is no longer needed (a stopped cluster must be started first, because it cannot be deleted while it still has instances); the snapshot can be restored later and bills only for backup storage
  • Delete read replicas that receive no reads before deciding on the cluster as a whole
  • For clusters needed only occasionally, stop them between uses and automate the stop again after the seven-day automatic restart, or move them to DocumentDB Serverless with a low minimum capacity
  • Review and expire manual snapshots left behind after deletion so they do not accumulate backup storage charges

Documentation

Vendor references for pricing and configuration.