Amazon DocumentDB
Databases · Common, learn when you need it
It is a database that speaks MongoDB's language but is built and run by AWS.
A coffee shop that makes a drink tasting like a famous chain's, close enough for most people, not identical.
What it actually does
You point a MongoDB driver at it and store JSON-like documents, and AWS handles backups, patching and failover. It is compatible with the MongoDB API up to version 5.0, not with MongoDB itself, so some commands, aggregation stages and features are missing. Check compatibility before committing, because migrations away from it are painful.
Reach for it when
- Moving an existing MongoDB app onto managed AWS infrastructure
- You want document storage without running database servers
- You need the MongoDB query style rather than SQL
Do not reach for it when
- You need the full modern MongoDB feature set, use MongoDB Atlas which also runs on AWS
- You are starting fresh with simple key lookups, DynamoDB is cheaper and scales better
One small example
A content platform moves its self-hosted MongoDB cluster to DocumentDB so nobody has to patch servers at midnight.
How you pay
Per instance-hour plus storage, I/O and backups. The surprise is that it runs on always-on instances, so a small idle cluster still costs over 200 dollars a month, and I/O charges can exceed the instance cost.
Usually sits next to
The real source
This is a simplified summary written for people learning AWS. The official AWS documentation is the authoritative word and it wins wherever this page disagrees with it.