Skip to content

DocumentDB reducing billed storage

0

Hi, currently I have DocumentDB with version 3.6. I am going to migrate version to 5.0.

According to documentation https://docs.aws.amazon.com/documentdb/latest/developerguide/how-it-works.html#how-it-works.storage, in version 5.0 deleting databases/collections will have impact on billed storage. How about single documents? If I have one collection and I'll delete some documents from this collection, will it also have impact on billed storage?

I am going to:

  • create cluster from snapshot on version 3.6
  • update in place version in new cluster to 5.0
  • remove unused data

Will such behavior reduce billed storage?

asked 10 months ago188 views

1 Answer
0
Accepted Answer

In Amazon DocumentDB 5.0, when you delete data, the overall allocated space decreases by a comparable amount, which can reduce your storage charges. This applies not only to dropping collections and indexes but also to deleting individual documents within a collection.

Your planned approach is a good strategy to reduce billed storage:

  1. Creating a cluster from a snapshot of your 3.6 version
  2. Performing an in-place upgrade to version 5.0
  3. Removing unused data (including individual documents)

This will indeed reduce your billed storage in version 5.0, unlike in version 3.6 where the cluster volume never decreases in size even when you free up space by deleting data. In version 3.6, the freed space is only reused but doesn't reduce the overall storage allocation.

Additionally, if you're looking to further optimize storage costs in DocumentDB 5.0, you might want to consider:

  • Enabling document compression, which uses the LZ4 algorithm to compress documents and can lower storage and I/O costs
  • Choosing the appropriate storage configuration (standard or I/O-optimized) based on your workload characteristics

For development and test scenarios, remember you can also stop clusters when not in use to optimize costs.
Sources
Amazon DocumentDB: how it works - Amazon DocumentDB
Managing collection-level document compression - Amazon DocumentDB
Amazon DocumentDB in-place major version upgrade - Amazon DocumentDB
Amazon DocumentDB cluster storage configurations - Amazon DocumentDB
Best practices for Amazon DocumentDB - Amazon DocumentDB

answered 10 months ago

AWS
EXPERT

reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.