With Amazon DocumentDB you only pay for what you use, there are no up-front costs, and there is no minimum fee. Amazon DocumentDB is priced in 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).
Other AWS-wide costs (such as data transfer between applications and DocumentDB across Availability Zones) may also apply.
Amazon DocumentDB offers the following features to help you optimize costs:
- Amazon DocumentDB provides per second billing for instances, with a ten minute minimum billing period.
- You can temporarily stop compute instances for up to 7 days when you don’t need to access your cluster (great for pausing test clusters over the weekend), and restart the instances when needed.
- 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.
- You get backup storage equivalent to 100% of your cluster’s data storage for free each month (e.g. if your cluster has 10TB of stored data, you get 10TB 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).
- Amazon DocumentDB’s storage and IO automatically scale to your workload, so you only pay for the resources you use, without needing to pre-provision.
- Amazon DocumentDB storage is highly durable and available, replicating data six ways across three AZs. While DocumentDB maintains six copies of your data, you only pay for a single copy, with pricing as low as $0.10 GB/month (prices may vary across AWS regions).
- Features like encryption at-rest with KMS, encryption in-transit with TLS, and monitoring with AWS CloudWatch are available for all clusters at no additional cost.
- Choose from AWS premium support plans with transparent pricing to match your needs. See AWS Support Plan Pricing for more information.
- Data transferred across Availability Zones between cluster instances is free.
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 replica instances in a cluster. Amazon DocumentDB utilizes a Multi-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 Availability Zone from the primary instance. Data transferred between Availability Zones for replication of Multi-AZ deployments is free.
Database Storage and IOs
You pay only for the storage and IOs that your Amazon DocumentDB cluster consumes, and 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.
IOs are input/output operations performed by the Amazon DocumentDB engine when performing reads and writes against cluster’s storage volume. IOs are billed per million IO requests. API calls like find, insert, update, and delete, features like change streams and TTL indexes, and tools like mongodump and mongorestore all utilize IOs by reading and/or writing from the storage volume.
Reads operations (8K pages) from the storage volume counts as one IO. Note, 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 IOs. To reduce read IOs, it is important that your instance is properly size and your application’s working set fits in memory. See Instance Sizing in the best practices documentation.
Write IOs are only consumed when pushing transaction log records to the storage layer for the purpose of making writes durable. Write IOs are counted in 4KB units. For example, a transaction log record that is 1024 bytes will count as one IO operation. However, concurrent write operations whose transaction log is less than 4KB can be batched together by the Amazon DocumentDB 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 IO consumption savings.
For best practices, see cost optimization.
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.
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.
- Moving 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 cluster storage for a region. (Based on our experience as database administrators, the vast majority of databases require less raw storage for a backup than for the primary dataset, meaning that most customers will never pay for backup storage.)
- For example, if you have two active Amazon DocumentDB clusters each with 300 GB-month of consumed cluster storage, we provide up to 600 GB-month of backup storage at no additional charge.
- Backup storage beyond this amount and backups stored after your cluster is terminated are billed at storage rates in the table below.
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 EC2 Instances in the same Availability Zone is free.
- Data transferred between Availability Zones for replication of Multi-AZ deployments is free.
- Amazon DocumentDB instances inside VPC: For data transferred between an Amazon EC2 instance and Amazon DocumentDB instance in different Availability Zones of the same Region, Amazon EC2 Regional Data Transfer charges apply on both sides of transfer.
Assume that your Amazon DocumentDB cluster is running a two instance db.r5.large cluster (on-demand) in US East (N. Virginia), you store 50 GB of data with 50 GB backup, 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 ($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).
Learn how to get started quickly.
Instantly get access to the AWS Free Tier.
Get started building with Amazon DocumentDB in the AWS Console.