AWS Pricing Calculator
Calculate your Amazon DocumentDB (with MongoDB compatibility) and architecture cost in a single estimate. Create your custom estimate now »
Amazon DocumentDB (with MongoDB compatibility) is a fully managed document database service that supports MongoDB workloads. With Amazon DocumentDB, you only pay for what you use, and there are no upfront costs. Amazon DocumentDB pricing has four dimensions:
- On-demand instances: The amount of compute instances for a cluster (pricing per second with a 10-minute minimum).
- Database I/O: The amount of I/O used when reading and writing data to your cluster’s storage volume (pricing per million I/Os).
- Database storage: The amount of data stored in your cluster's storage volume (pricing per GB/month).
- Backup storage: The amount of backup storage used in excess of your cluster’s database storage usage (pricing per GB/month).
Your total database spend will depend on the storage configuration of your database cluster. You can choose from two options:
- Amazon DocumentDB Standard (pay-per-use I/O configuration): Amazon DocumentDB standard configuration is designed for low to moderate I/O consumption, and provides adaptability to suit your dynamic I/O needs. If you expect your I/O costs to be less than 25% of your database cluster spend, this configuration might be ideal for you. You are billed across all four dimensions: on-demand instances, database I/O, database storage, and backup storage.
- Amazon DocumentDB I/O-Optimized (I/O included configuration): Amazon DocumentDB I/O-Optimized is designed to prioritize price predictability or I/O intensive applications. If you expect your I/O costs to exceed 25% of your database cluster spend, this configuration offers enhanced price performance. With Amazon DocumentDB I/O-Optimized storage configuration, you are billed across three dimensions: on-demand instances, database storage, and backup storage. You are not charged for database I/O operations, ensuring predictable costs each billing cycle.
Other AWS-wide costs such as data transfer between applications and Amazon DocumentDB across Availability Zones (AZs) may also apply.
Cost optimization
Amazon DocumentDB helps you optimize costs with the following features:
Per-second billing: Amazon DocumentDB provides per second billing for instances, with a 10-minute minimum billing period.
Pause instances: You can temporarily stop compute instances for up to seven days when you don’t need to access your cluster (great for pausing test clusters over the weekend) and restart the instances when needed.
Single-instance durability: Amazon DocumentDB instances are not data bearing, so you can provision a highly durable cluster with just a single instance, a popular approach for development clusters.
Low-cost backup: You get backup storage equivalent to 100 percent of your cluster’s data storage for free each month (e.g., if your cluster has 10 TB of stored data, you get 10 TB of backup for free). Additional backup storage beyond the free allotment is priced as low as $0.02 per GB/month (prices may vary across AWS regions).
Automatic scaling: Amazon DocumentDB’s storage and I/O automatically scale to your workload, so you pay only for the resources you use, without needing to pre-provision.
Data replication: Amazon DocumentDB storage is highly durable and available, making your data durable across three Availability Zones (AZs) within a Region, you pay only for a single copy, with pricing as low as $0.10 GB/month (prices may vary across AWS regions).
Storage configuration: Choose between standard and I/O-Optimized storage configurations for your database cluster, enabling you to maximize your price performance.
No-cost encryption and monitoring: Features like encryption at-rest with AWS Key Management Service (AWS KMS), encryption in-transit with Transport Layer Security (TLS), and monitoring with AWS CloudWatch are available for all clusters at no additional cost.
Premium support plans: Choose from AWS premium support plans with transparent pricing to match your needs. See AWS Support Plan Pricing for more information.
Free cluster instance transfer across AZs: Data transferred across Availability Zones between cluster instances is free.
Amazon DocumentDB free trial
As part of AWS free tier we offer a free document database trial. If your organization has never created an Amazon DocumentDB cluster, you are eligible for a one month free trial. The free document database trial includes 750 hours per month of db.t3.medium instance usage, 30 million IOs, 5 GB of storage, and 5 GB of backup storage for free for 30 days. After the one-month free trial expires or your usage exceeds the free allowance, you can shut down your cluster to avoid any charges or keep it running at our standard on-demand rates.
Note - The Amazon DocumentDB Free Trial is not available in the in the AWS GovCloud (US) regions or the China (Ningxia) region at this time.
On-demand instance pricing
On-demand instances let you pay per second, with no long-term commitments or upfront fees. This frees you from the cost and complexity of planning and purchasing database capacity in advance and having to guess the correct capacity.
Pricing is per instance-hour consumed, from the time an instance is launched until it is stopped or deleted. Partial instance hours are billed in one-second increments, with a 10-minute minimum charge following a billable status change such as creating, modifying, or deleting an instance.
Instance pricing applies to both the primary and the replica instances in a cluster. Amazon DocumentDB utilizes a multi-Availability Zone (AZ) architecture for high availability. The cost of multi-AZ deployments is simply the cost of the primary instance plus the cost of each replica instance.
To maximize availability, we recommend placing at least one replica in a different AZ from the primary instance. Data transferred between AZs for replication of multi-AZ deployments is free.
Amazon DocumentDB T3 and T4g medium instances run in unlimited mode, which means that you will be charged if your average CPU utilization over a rolling 24-hour period exceeds the baseline of the instance. CPU Credits are charged at $0.09 per vCPU-Hour. The CPU Credit pricing is the same for all T3 and T4 instance sizes across all regions.
For more information on how unlimited burstable performance instances work and how they are priced, see unlimited mode concepts.
Database storage and I/Os
You pay only for the storage and I/Os that your Amazon DocumentDB cluster consumes, and you do not need to provision these resources in advance.
Storage consumed by your Amazon DocumentDB cluster is billed per GB-month. Billable storage includes your data, indexes, and change stream data. For more information, see Amazon DocumentDB Storage.
I/Os are input/output operations performed by the Amazon DocumentDB engine when performing reads and writes against cluster’s storage volume. I/Os are billed per million I/O requests. API calls like find, insert, update, and delete, features like change streams and TTL indexes, and tools like mongodump and mongorestore all use I/Os by reading and/or writing from the storage volume.
Read operations (8K pages) from the storage volume counts as one I/O. Once the data has been read from the storage volume and continues to reside in memory, subsequent reads of the same data do not incur additional I/Os. To reduce read I/Os, it is important that your instance is properly sized and your application’s working set fits in memory. See Instance Sizing in the best practices documentation.
Write I/Os are only consumed when pushing transaction log records to the storage layer for the purpose of making writes durable. Write I/Os are counted in 4 KB units. For example, a transaction log record that is 1024 bytes will count as one I/O operation.
However, concurrent write operations whose transaction log is less than 4 KB can be batched together by the Amazon DocumentDB database engine in order to optimize I/O consumption. Unlike traditional database engines, DocumentDB never pushes modified database pages to the storage layer, resulting in further I/O consumption savings.
Amazon DocumentDB implements a multi-version concurrency control (MVCC) database architecture and creates a new versioned document and index entry for every update operation. Versioned documents are managed transparently by DocumentDB. An MVCC architecture improves query throughput and provides read isolation, as read queries can use versioned documents instead of taking locks.
When queries no longer require an older version of a document or an index entry, a garbage collector reclaims the old document and index entry. The garbage collector runs periodically to inspect old documents and index entries, which results in read I/Os to load the old documents and index entries into memory, if they are not already present, and write I/Os to delete them.
To minimize I/Os that result from garbage collection, it is recommended that you remove unused indexes and scale instances so that indexes fit in memory. For more information, see the Amazon DocumentDB best practices documentation.
Pricing examples
Example 1: Standard storage configuration
Assume that your Amazon DocumentDB cluster is running a two-instance db.r5.large cluster (on-demand) in US East (N. Virginia) with a standard storage configuration. You store 50 GB of data with 50 GB backup and perform 200 million I/Os per month.
The on-demand pricing for db.r5.large instance is $0.277 per hour, so your monthly cost for the two instances will be $404.42 ($0.277 * 730 * 2).
Your storage cost will be $0.10 per GB/month, so for 50 GB storage, your (30-day) monthly cost will be $5.00 ($0.10 * 50). There will be no additional charge for your backup storage because it does not exceed your data storage for the region.
Your I/O cost will be $0.20 per million request increments, so for your 200 million I/Os per month, your cost will be $40.00 ($0.20 * 200).
Your total monthly bill for Amazon DocumentDB for this example would be $449.42 ($404.42 for instance + $5.00 for storage + $40.00 for I/O).
Example 2: I/O-Optimized storage configuration
Assume that your Amazon DocumentDB cluster is running a two-instance db.r5.large cluster (on-demand) in US East (N. Virginia) with I/O-Optimized storage configuration for your clusters. You store 50 GB of data with 50 GB backup and perform 1,000 million I/Os per month.
The on-demand pricing for I/O-Optimized db.r5.large instance is $0.3047 per hour, so your monthly cost for the two instances will be $444.86 ($0.3047 * 730 * 2).
Your storage cost will be $0.30 per GB/month, so for 50 GB storage, your (30-day) monthly cost will be $15.00 ($0.30 * 50). There will be no additional charge for your backup storage because it does not exceed your data storage for the region.
Your I/Os are included in this option. So, you will not be charged for I/O operations.
Your total monthly bill for Amazon DocumentDB for this example would be $459.86 ($444.86 for instance + $15.00 for storage + $0.00 for I/O). In this example, with I/O-Optimized storage configuration, you saved 24.5% of your costs compared to standard configuration.
Amazon DocumentDB Elastic Clusters
Amazon DocumentDB Elastic Clusters are a new type of Amazon DocumentDB cluster that lets you elastically scale your document database to handle millions of reads and writes with petabytes of storage capacity. Pay only for what you use, and there are no upfront costs. Amazon DocumentDB Elastic Clusters pricing has three dimensions:
vCPU: The amount of compute measured in vCPUs for a cluster (priced per minute with a 10-minute minimum).
Database storage: The amount of data stored in your cluster’s storage volume (pricing per GB-month).
Backup storage: The amount of backup storage used in excess of your cluster’s database storage usage (pricing per GB-month).
On-demand vCPU pricing
On-Demand vCPUs let you pay per second, with no long-term commitments or upfront fees. This frees you from the cost and complexity of planning and purchasing database capacity in advance, and from having to guess the correct capacity. Pricing is per vCPU hour consumed, from the time your Amazon DocumentDB Elastic Clusters is launched until it is deleted. vCPUs provide RAM (memory), I/O operations, and the required CPU cores for your workload. Partial vCPU hours are billed in one-second increments, with a 10-minute charge following a billable status change such as creating, modifying, or deleting your cluster.
The number of vCPUs in a cluster is calculated by number of shards * number of nodes per shard * the compute capacity per node (measured in vCPUs).
Elastic Clusters database storage
You pay only for the storage that your Amazon DocumentDB Elastic Clusters consumes and don’t need to provision storage in advance. Storage consumed by your Amazon DocumentDB Elastic Clusters is billed per GB-month. Billable storage includes your data, indexes, and change stream data. For more information, see Amazon DocumentDB Storage.
Elastic Clusters backup storage
Backup storage for a Amazon DocumentDB Elastic Clusters is the storage associated with any manual cluster snapshots.
- Backup storage is allocated by Region. Total backup storage space is equivalent to the sum of the storage for all backups in that Region.
- Copying a snapshot to another Region increases allocated backup storage in the destination Region.
- There is no additional charge for backup storage of up to 100% of your total Amazon DocumentDB Elastic Clusters storage for the Region.
Pricing example
Assume that your Amazon DocumentDB Elastic Clusters is running two shards with two vCPUs per node in US East (N. Virginia), and you store 500 GB of data with 500 GB backup.
The on-demand pricing per vCPU is $0.132 per hour so your monthly cost for the two shards each with two nodes is $770.88 ($0.132 * 730 hours * 2 shards * 2 nodes per shard * 2 vCPUs per node).
Your storage cost is $0.30 per GB/month so for 500 GB storage, your (30-day) monthly cost is $150 ($0.30 * 500). There will be no additional charge for your backup storage because it does not exceed your data storage for the region.
For this example, your total monthly bill for Amazon DocumentDB is $920.88 ($770.88 for compute + $150.00 for storage).
Amazon DocumentDB Global Clusters
Amazon DocumentDB Global Clusters is an optional feature that provides fast replication across regions with latencies of less than one second using dedicated infrastructure with little to no impact to your workload’s performance. With global clusters, you can recover from region-wide outages and serve low-latency global reads by allowing reads from the nearest DocumentDB cluster.
You pay for replicated write I/Os between the primary region and each secondary region. The number of replicated write I/Os to each secondary region is the same as the number of in-region write I/Os performed by the primary region. Apart from replicated write I/Os, you pay standard DocumentDB rates for instances, storage, cross-region data transfer, and backup storage.
Except as otherwise noted, our prices are exclusive of applicable taxes and duties, including VAT and applicable sales tax. For customers with a billing address in Japan, use of AWS is subject to Japanese Consumption Tax. Learn more.
Data transfer
The pricing below is based on data transferred “in” and “out” of Amazon DocumentDB.
Except as otherwise noted, our prices are exclusive of applicable taxes and duties, including VAT and applicable sales tax. For customers with a Japanese billing address, use of AWS is subject to Japanese Consumption Tax. Learn more.
Data transferred between Amazon DocumentDB and Amazon Elastic Compute Cloud (EC2) instances in the same Availability Zone is free.
Data transferred between AZs for replication of multi-AZ deployments is free.
Amazon DocumentDB instances inside Amazon Virtual Private Cloud (VPC): For data transferred between an Amazon EC2 instance and DocumentDB instance in different AZs of the same Region, EC2 Regional Data Transfer charges apply on both sides of transfer.
Backup storage
Backup storage for an Amazon DocumentDB cluster is the storage associated with your automated cluster backups and any manual cluster snapshots. Increasing your backup retention period or taking manual cluster snapshots increases the backup storage consumed.
Backup storage is allocated by region. Total backup storage space is equivalent to the sum of the storage for all backups in that region.
Copying a snapshot to another region increases allocated backup storage in the destination region.
There is no additional charge for backup storage of up to 100 percent of your total Amazon DocumentDB cluster storage for a region. There is also no additional charge for backup storage if your backup retention period is one day and you do not have any manual snapshots beyond the backup retention period.
Backup storage beyond this amount and manual snapshots retained outside of the backup retention period, whether your cluster is active or has been deleted, are billed at storage rates in the table below.
Frequently Asked Questions
Amazon DocumentDB replicates each chunk of my storage volume six ways across three Availability Zones. Does that mean that my effective storage price will be three or six times what is shown on the pricing page?
No. Amazon DocumentDB’s storage replication feature is included in the price. You are charged based on the size of the data in your cluster, and you are not charged separately for the replicated storage.
What are I/Os in Amazon DocumentDB and how are they calculated?
I/Os are input/output operations performed by Amazon DocumentDB against a solid-state drive (SSD)-based virtualized storage layer. Every database page read operation counts as one I/O. Amazon DocumentDB issues reads against the storage layer in order to fetch pages not present in the buffer cache. Each page is 8 KB in Amazon DocumentDB.
Amazon DocumentDB was designed to eliminate unnecessary I/O operations in order to reduce costs and to ensure resources are available for serving read/write traffic. Write I/Os are only consumed when pushing write-ahead log records to the storage layer for the purpose of making writes durable. Write I/Os are counted in 4 KB units.
For example, a log record that is 1 KB will count as one I/O operation. However, concurrent write operations whose write-ahead log is less than 4 KB can be batched together by the Amazon DocumentDB cloud database engine in order to optimize I/O consumption.
Unlike traditional database engines, Amazon DocumentDB never pushes modified database pages to the storage layer, resulting in further I/O consumption savings.
You can see how many I/Os your Amazon DocumentDB cluster is consuming by going to the AWS Console. To find your I/O consumption, go to the Amazon DocumentDB section of the console, look at your list of clusters, select your Amazon DocumentDB cluster, then look for the “VolumeReadIOPs” and “VolumeWriteIOPs” metrics in the monitoring section.
How does per-second billing work?
Instance pricing is calculated from the time the instance is created to the time the instance is deleted. Instances are billed in one second increments, with a 10-minute minimum charge following a billable status change such as creating, modifying, or deleting an instance.
As an example, if you create an r5.large instance at 1:00:00 PM, modify the instance to an r5.xlarge at 1:30:00 PM and delete the instance at 1:50:00 PM, you will be charged for 1,800 seconds (30 minutes) at r5.large pricing and 1,200 seconds (20 minutes) at r5.xlarge prices.
If you create an r5.large instance at 3:00:00 PM and delete it at 3:06:00PM, the 10-minute minimum applies, and you will be charged for 600 seconds (10 minutes) at r5.large pricing.
Get started building with Amazon DocumentDB in the AWS Console.