Amazon DocumentDB is AWS's managed document database for apps built on MongoDB APIs and drivers, run on serverless capacity, instances or sharded clusters.
Amazon DocumentDB keeps application data as documents and answers queries sent through the MongoDB API, so code written for MongoDB drivers runs against a database that AWS operates. Its full name is Amazon DocumentDB (with MongoDB compatibility). It takes patching, backups and monitoring off the team that owns the application. Amazon builds and runs it through Amazon Web Services, which also makes DynamoDB, RDS and ElastiCache. A cluster runs in one of several modes. DocumentDB Serverless adjusts compute in fine-grained steps as demand rises and falls, while provisioned clusters run on memory-optimized instance classes chosen in advance. Elastic Clusters split collections across shards by a shard key and redistribute the data when shards are added. Global Clusters copy a cluster from its primary Region to read-only secondary Regions for disaster recovery and nearby reads. Inside each cluster the engine handles multi-document ACID transactions, aggregation pipelines, change streams, text search and vector search with HNSW or IVFFlat indexes. Storage is replicated across three Availability Zones, and point-in-time restore returns a cluster to any moment within its backup retention period. The service is aimed at development teams that already build on MongoDB drivers, frameworks and tooling and want to move those applications to AWS, typically without code changes or downtime. Serverless targets highly variable workloads that would otherwise be sized for their peak. Banking, healthcare and public sector organizations are a stated audience, with security and compliance controls built for high-sensitivity data. Role-based access scoped to collections and client-side field level encryption let security teams limit who can read a sensitive field. A cluster is created from the AWS console under the same account that runs a company's other AWS services. Content management systems, e-commerce catalogs, mobile and web back ends and generative AI applications are the jobs it is built around. A retailer can keep a catalog whose products carry different attributes, stream every change to downstream services and expire stale session records with TTL indexes. Operators watch clusters in Amazon CloudWatch and grant access through AWS IAM, the same controls they use across their AWS accounts. When an application needs richer search, documents replicate to Amazon OpenSearch Service through a zero-ETL integration. Analysts can also build machine learning models on the same documents in Amazon SageMaker Canvas without writing code.
Pricing
View plans-
Serverless
Custom pricing
- $0.0822 per DCU-hour on Standard storage, billed per second, US East (Ohio)
- $0.0905 per DCU-hour with the I/O-Optimized storage configuration
- Starts at 0.5 DCU and scales in increments of 0.5 DCU
- Up to 15 read replicas, Multi-AZ deployments supported
- Standard storage $0.10 per GB-month plus $0.20 per million I/Os
- 7 DCUs for 30 minutes plus a 3-minute scale-down cost $0.32 in compute on Standard
-
Provisioned On-Demand Instance
Custom pricing
- $0.276 an hour for db.r8g.large (2 vCPU, 16 GiB) on Standard storage, US East (Ohio)
- $0.304 an hour for db.r8g.large with I/O-Optimized storage
- db.r6g.large $0.263 an hour, or $0.290 with I/O-Optimized
- Up to db.r8g.48xlarge at $26.500 an hour, or $29.150 with I/O-Optimized
- Two db.r5.large instances with 50 GB stored and 200 million I/Os a month total $449.42 a month on Standard
- The same pair with 1,000 million I/Os a month totals $459.86 a month on I/O-Optimized
- T3 and T4g medium instances run in unlimited mode, CPU credits $0.09 per vCPU-hour above baseline
- One-month trial for new users with 750 hours of db.t3.medium, 30 million I/Os, 5 GB storage and 5 GB backup
- Trial not offered in AWS GovCloud (US) or China (Ningxia)
-
Elastic Clusters
Custom pricing
- $0.132 per vCPU-hour, US East (Ohio), summed over shards, nodes per shard and vCPUs per node
- Storage $0.30 per GB-month, backup storage $0.021 per GB-month
- Each shard instance up to 64 vCPUs
- 2 shards of 2 nodes with 2 vCPUs each and 500 GB stored total $920.88 a month
- Automatic sharding runs in this mode only; change streams are not supported here
-
Global Clusters
Custom pricing
- $0.20 per million replicated write I/Os, US East (Ohio), on top of each cluster's charges
- Writes go to the primary Region, with up to 10 read-only secondary Regions
-
Storage, backup and data transfer
Custom pricing
- Standard storage $0.10 per GB-month plus $0.20 per million I/Os, US East (Ohio)
- I/O-Optimized storage $0.30 per GB-month with no I/O charge
- Backup storage beyond the free allotment from $0.02 per GB-month
- Data out to the internet free for the first 1 GB a month, then $0.09 per GB for the next 9.999 TB
Features
- Included: Schemaless document storage
- Included: Secondary indexes on any field
- Included: Multi-document ACID transactions
- Included: Automatic sharding across nodes
- Included: Tunable consistency per operation
- Not included: Multi-region active-active writes
- Included: Server-side aggregation pipelines
- Included: Change streams for downstream consumers
- Included: Time-to-live expiry on records
- Included: Integrated full-text search on documents
- Included: Vector search on embedded fields
- Not included: Multi-model data access
- Included: Collection-level access roles
- Included: Client-side field-level encryption
- Included: Continuous backup with point-in-time restore
- Not included: Embedded mobile database with sync
- Not included: Open source community edition
- Not included: Serverless on-demand capacity pricing
Additional Features
- MongoDB API and driver compatibility
- DocumentDB Serverless autoscaling compute
- Memory-optimized db.r8g, db.r6g and db.r5 instance classes
- Push-button compute scaling
- Elastic Clusters sharding by shard key
- Global Clusters with read-only secondary Regions
- Up to 15 low-latency read replicas
- Multi-AZ deployments with read replicas
Best for
- Development teams moving MongoDB-driver applications onto a managed AWS service
- Companies whose applications already run on AWS
- Highly variable workloads that would otherwise be provisioned for peak load
- I/O-heavy applications that want predictable storage costs
- Regulated organizations in banking, healthcare and the public sector
- Applications needing disaster recovery and local reads in other AWS Regions
- Teams adding vector search to operational document data
Use cases
- Running the document store behind a content management system
- Holding product catalogs for an e-commerce site
- Backing mobile and web application data
- Keeping user profiles whose fields vary from record to record
- Storing embeddings for generative AI retrieval
- Migrating a MongoDB application without rewriting its code
- Feeding document changes to downstream services through change streams
- Expiring session or event records with TTL indexes
- Spreading a large collection across shards with Elastic Clusters
- Serving low-latency reads in other Regions with Global Clusters
- Replicating documents to OpenSearch Service for search
- Building no-code ML models on document data in SageMaker Canvas
Screenshots & Videos
Explore Amazon DocumentDB in action
User Reviews
Compare with Similar Software
Click to compare side by side with Amazon DocumentDB