- Databases›
- Amazon DocumentDB›
- FAQs
Amazon DocumentDB (with MongoDB compatibility) FAQs
General
Open allAmazon DocumentDB is a serverless, fully managed, MongoDB API-compatible document database service. It removes the undifferentiated heavy lifting of database management tasks such as patching, backups, and monitoring. Amazon DocumentDB provides improved resilience and low latency with Global Clusters and leading security and compliance built to satisfy the requirements of high- sensitivity organizations such as global banks. It offers low total cost of ownership (TCO) with transparent pricing and no hidden costs. Its memory-optimized instances offer up to 43% cost savings compared to other popular document databases. I/O-Optimized provides improved price performance with up to 40% cost savings for I/O-intensive applications. Amazon DocumentDB is compatible with MongoDB APIs and drivers so you can migrate applications, typically without application code changes or downtime.
Document databases are one of the fastest growing categories of NoSQL databases, as they offer both flexible schemas and extensive query capabilities. The document model is a great choice for use cases with dynamic datasets that require ad-hoc querying, indexing, and aggregations. With the scale that Amazon DocumentDB provides, it is used by a wide variety of customers for use cases such as content management, personalization, catalogs, mobile and web applications, IoT, semantic search, and user profile management.
“MongoDB compatibility” means that Amazon DocumentDB interacts with the Apache 2.0 open source MongoDB APIs. As a result, you can use the same MongoDB drivers, applications, and tools with Amazon DocumentDB with little or no changes. While Amazon DocumentDB supports a vast majority of the MongoDB APIs that customers use, it does not support every MongoDB API. Our focus is to deliver the capabilities that customers need.
We work backwards from customer needs and deliver capabilities, such as MongoDB API-compatibility, transactions, and sharding. To learn more about the supported MongoDB APIs, see our compatibility documentation . To learn about recent Amazon DocumentDB launches, see our What's New Feed.
Amazon DocumentDB 8.0 provides compatibility with MongoDB 8.0 by adding support for MongoDB 8.0 API drivers. You can migrate workloads running on MongoDB 6.0, 7.0, and 8.0 to Amazon DocumentDB 8.0. You can use your existing MongoDB drivers, tools, and application code with Amazon DocumentDB 8.0.
For MongoDB 3.6, 4.0, and 5.0 applications, Amazon DocumentDB continues to support these APIs in their corresponding versions (Amazon DocumentDB 3.6, 4.0, and 5.0).
No. Amazon DocumentDB does not utilize any MongoDB SSPL code and thus is not restricted by this license. Instead, Amazon DocumentDB interacts with the Apache 2.0 open-source MongoDB APIs. We continue to listen and work backward from our customers to deliver the capabilities that they need. To learn more about the supported MongoDB APIs, see the compatibility documentation.
Customers can use AWS Database Migration Service (DMS) to migrate their on-premises or Amazon Elastic Compute Cloud (EC2) MongoDB databases to Amazon DocumentDB with virtually no downtime. With DMS, you can migrate from a MongoDB replica set or from a sharded cluster to Amazon DocumentDB. Additionally, you can use most existing tools to migrate data from a MongoDB database to Amazon DocumentDB, including mongodump/mongorestore, mongoexport/mongoimport , and third-party tools that support Change Data Capture (CDC) via the oplog. For more information, see Migrating to Amazon DocumentDB .
No, Amazon DocumentDB works with a vast majority of MongoDB APIs, drivers, and tools compatible with MongoDB versions 3.6, 4.0, 5.0, 6.0, 7.0, and 8.0.
Yes. With the launch of support for MongoDB 4.0 compatibility, Amazon DocumentDB supports the ability to perform atomicity, consistency, isolation, durability (ACID) transactions across multiple documents, statements, collections, and databases. To learn more, see our documentation Transctions in Amazon DocumentDB.
No, Amazon DocumentDB does not follow the same support lifecycles as MongoDB and MongoDB's EOL schedule does not apply to Amazon DocumentDB.
Amazon DocumentDB instances are deployed within a customer's Amazon Virtual Private Cloud (Amazon VPC) and can be accessed directly by Amazon Elastic Compute Cloud (Amazon EC2) instances or other AWS services that are deployed in the same VPC. Additionally, Amazon DocumentDB can be accessed by Amazon EC2 instances or other AWS services in different VPCs in the same region or other regions via VPC peering. Access to Amazon DocumentDB instances must be done through the mongo shell or with MongoDB drivers. Amazon DocumentDB requires that you authenticate when connecting to a cluster. For additional options, see Connecting to an Amazon DocumentDB instance from Outside an Amazon VPC .
For certain management features such as instance lifecycle management, encryption-at-rest with Amazon Key Management Service (KMS) keys and security groups management, Amazon DocumentDB leverages operational technology that is shared with Amazon Relational Database Service (RDS) and Amazon Neptune . When using the describe-db-instances and describe-db-clusters AWS CLI APIs, we recommend filtering for Amazon DocumentDB resources using the following parameter: "--filter Name=engine,Values=docdb".
Please see the Amazon DocumentDB pricing page for current information on available instance types per region.
To try Amazon DocumentDB, please see the Getting Started guide.
Yes, Amazon DocumentDB offers a Service Level Agreement of 99.99% uptime, which applies separately to each account using Amazon DocumentDB. For more information, please see Amazon DocumentDB (with MongoDB compatibility) Service Level Agreement.
The open source DocumentDB project, under the stewardship of the Linux Foundation, aims to provide the developer community with a PostgreSQL-based, 100% MongoDB API-compatible document database. In August 2025, AWS announced it is joining this project as a member of the technical steering committee.
While both open source DocumentDB and Amazon DocumentDB use DocumentDB in their name and are MongoDB API-compatible, the two software are different. While Amazon DocumentDB is built by AWS, open source DocumentDB is an extension of PostgreSQL. AWS will invest in both Amazon DocumentDB and open source DocumentDB akin to how we invest in Amazon OpenSearch Service and OpenSearch. We will contribute Amazon DocumentDB innovations to the open source project, and adopt features and capabilities from open source DocumentDB to our managed Amazon DocumentDB service.
Serverless
Open allAmazon DocumentDB Serverless is an on-demand, auto scaling configuration for Amazon DocumentDB. It automatically scales capacity up or down in fine-grained increments based on your application's demand, offering up to 90% cost savings compared to provisioning for peak capacity. For applications with variable workloads, Amazon DocumentDB Serverless offers simplified resource management, with no upfront commitments or additional costs, so you only pay for the database capacity used. Amazon DocumentDB Serverless provides the same MongoDB compatible-APIs and capabilities as Amazon DocumentDB, including read replicas, Performance Insights, and I/O-Optimized storage.
With Amazon DocumentDB Serverless, you create a database, specify the desired range for database capacity, and connect your application. Amazon DocumentDB automatically adjusts the capacity within the range specified based on your application’s needs. You pay on a per-second basis for the database capacity you use when the database is active.
Amazon DocumentDB Serverless is available with Amazon DocumentDB 5.0 for both new and existing clusters. Serverless is not currently supported with Amazon DocumentDB 8.0.
Yes, you can switch between Serverless and choosing provisioned database resources at any time. Before switching between Serverless and provisioned resources, it is important to ensure your workload remains sufficiently performant. You can test the desired configuration by cloning your Amazon DocumentDB cluster and applying the desired configuration on the cloned cluster for testing before applying the same changes to your production environment. You can also easily fall back by switching to a previous configuration at any time.
Yes, you can set the capacity explicitly to a specific value using the AWS Management Console, the AWS CLI, or the Amazon DocumentDB API.
Yes, you can start using Amazon DocumentDB Serverless to manage database compute capacity in your existing Amazon DocumentDB instance. A cluster containing both provisioned instances as well as Amazon DocumentDB Serverless is referred to as a mixed-configuration cluster. You can choose to have any combination of provisioned instances and Amazon DocumentDB Serverless in your cluster.
Amazon DocumentDB Serverless supports the same MongoDB compatible-APIs and capabilities as Amazon DocumentDB, including Transactions, AWS Availability Zones, and Performance Insights. It does not support Elastic Clusters.
In Amazon DocumentDB Serverless, database capacity is measured in Amazon DocumentDB Capacity Units (DCUs). You pay a flat rate per second of DCU usage. Compute costs for running your workloads on Amazon DocumentDB Serverless will depend on the database cluster configuration that you choose: Amazon DocumentDB Standard or Amazon DocumentDB I/O-Optimized storage. For current information about pricing and Regional availability, visit the Amazon DocumentDB pricing page.
Performance and scaling
Open allAmazon DocumentDB is designed for high, predictable performance at scale. For read-heavy workloads, you can add up to 15 read replicas that share the same underlying storage, avoiding replica write overhead and delivering higher aggregate read throughput while keeping replica lag typically in milliseconds. Your data is replicated across three Availability Zones with fast failover for quick recovery.
Amazon DocumentDB scales in two dimensions: storage and compute. Amazon DocumentDB's storage automatically scales from 10 GB to 128 TiB in instance-based clusters, and up to 4 PiB for Amazon DocumentDB Elastic Clusters. Amazon DocumentDB's Compute can be scaled vertically by creating larger instances and horizontally (for greater read throughput) by adding additional replica instances to the cluster.
The minimum storage is 10 GiB. Based on your cluster usage, your Amazon DocumentDB storage will automatically grow, up to 128 TiB in 10 GiB increments with no impact on performance. With Amazon DocumentDB Elastic Clusters, storage will automatically grow up to 4 PiB in 10 GiB increments. For either case, there is no need to provision storage in advance.
Pricing
Open allFor current information about pricing and Region availability, please refer to the Amazon DocumentDB pricing page.
Yes, you can try Amazon DocumentDB for free using a one month free trial. Your organization gets up to 750 hours of t3.medium instance usage, 30 million IOs, 5 GB of storage, and 5 GB of backup storage. Once your 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. To learn more, refer to the Amazon DocumentDB free trial page.
Yes, you can purchase a Database Savings Plans for your Amazon DocumentDB usage and reduce your costs by up to 30% when you commit to a consistent amount of usage over a 1-year term. Additional information on eligible usage can be found on Database Savings Plans pricing page.
Amazon DocumentDB I/O-Optimized is the ideal choice when you need predictable costs or have I/O intensive applications. If you expect your I/O costs to exceed 25% of your total Amazon DocumentDB database costs, this option offers enhanced price performance. Refer to our Amazon DocumentDB I/O-Optimized documentation to learn more, including how to get started.
You can switch your existing database clusters once every 30 days to Amazon DocumentDB I/O-Optimized. You can switch back to Amazon DocumentDB standard storage configurations at any time.
Yes, the charges for the I/O operations required to replicate data across regions continue to apply. Amazon DocumentDB I/O-Optimized does not charge for read and write I/O operations, which is different from data replication. Refer to our Amazon DocumentDB I/O-Optimized documentation to learn more.
Elastic Clusters
Open allYou can create an Elastic Clusters cluster using the Amazon DocumentDB API, SDK, CLI, CloudFormation (CFN), or the AWS console. When provisioning your cluster, you specify how many shards and the compute per shard that your workload needs. Once you have created your cluster, you are ready to start leveraging Elastic Clusters’ elastic scalability. Now, you can connect to the Elastic Clusters cluster and read or write data from your application. Elastic Clusters is elastic. Depending on your workload’s needs, you can add or remove compute by modifying your shard count and/or compute per shard using the AWS console, API, CLI, or SDK. Elastic Clusters will automatically provision/de-provision the underlying infrastructure and rebalance your data.
Elastic Clusters uses sharding to partition data across Amazon DocumentDB’s distributed storage system. Sharding, also known as partitioning, splits large data sets into small data sets across multiple nodes enabling customers to scale out their database beyond vertical scaling limits of a single database. Elastic Clusters utilizes the separation of compute and storage in Amazon DocumentDB. Rather than re-partitioning collections by moving small chunks of data between compute nodes, Elastic Clusters can copy data efficiently within the distributed storage system.
Elastic Clusters supports hash-based partitioning.
With Elastic Clusters, you can easily scale out or scale in your workload on Amazon DocumentDB typically with little to no application downtime or impact to performance regardless of data size. A similar operation on MongoDB would impact application performance and take hours, and in some cases days. Elastic Clusters also offers differentiated management capabilities such as no impact backups and rapid point in time restore enabling customers to focus more time on their applications rather than managing their database.
No. You do not need to make any changes to your application to use Elastic Clusters.
No, in the near-term, you can use AWS Database Migration Service (AWS DMS) to migrate data from an existing Amazon DocumentDB instance cluster to an Elastic Clusters cluster.
Choosing an optimal shard key for Elastic Clusters is no different than other databases. A great shard key has two characteristics - high frequency and high cardinality. For example, if your application stores user_orders in Amazon DocumentDB, then generally you have to retrieve the data by the user. You want all orders related to a given user to be in one shard. In this case, user_id would be a good shard key.
Elastic Clusters integrates with other AWS services in the same way DocumentDB does today. First, you can use AWS Database Migration Service (DMS) to migrate from MongoDB and other relational databases to Elastic Clusters. Second, you can monitor the health and performance of your Elastic Clusters cluster using Amazon CloudWatch. Third, you can set up authentication and authorization through AWS IAM users and roles and use AWS VPC for secure VPC-only connections. Last, you can use AWS Glue to import and export data from/to other AWS services such as S3, Redshift and OpenSearch.
Yes. You can migrate your existing MongoDB sharded workloads to Elastic Clusters. You can either use the AWS Database Migration Service or native MongoDB tools, such as mongodump and mongorestore, to migrate your MongoDB workload to Elastic Clusters. Elastic Clusters also supports MongoDB’s commonly used APIs, such as shardCollection(), giving you the flexibility to reuse existing tooling and scripts with Amazon DocumentDB.
Backup and restore
Open allAutomated backups are always enabled on Amazon DocumentDB clusters. Amazon DocumentDB enables point-in-time recovery for your clusters. You can increase your backup window for point-in-time restores up to 35 days. Backups do not impact database performance. To learn more, see Backing up and restoring in Amazon DocumentDB.
Yes. Manual snapshots can be retained beyond the backup window and there is no performance impact when taking snapshots. Note that restoring data from cluster snapshots requires creating a new cluster.
Amazon DocumentDB automatically makes your data durable across three Availability Zones (AZs) within a Region and will automatically attempt to recover your instance in a healthy AZ with no data loss. In the unlikely event your data is unavailable within Amazon DocumentDB storage, you can restore from a cluster snapshot or perform a point-in-time restore operation to a new cluster. Note that the latest restorable time for a point-in-time restore operation can be up to five minutes in the past.
You can choose to create a final snapshot when deleting your instance. If you do, you can use this snapshot to restore the deleted instance at a later date. Amazon DocumentDB retains this final user- created snapshot along with all other manually created snapshots after the instance is deleted. Only snapshots are retained after the instance is deleted (i.e., automated backups created for point-in-time restore are not kept).
You can choose to create a final snapshot when deleting your instance. If you do, you can use this snapshot to restore the deleted instance at a later date. Amazon DocumentDB retains this final user- created snapshot along with all other manually created snapshots after the instance is deleted. Only snapshots are retained after the instance is deleted (i.e., automated backups created for point-in-time restore are not kept).
No. Amazon DocumentDB snapshots can only be used inside of the service.
You can choose to create a final snapshot when deleting your cluster. If you do, you can use this snapshot to restore the deleted cluster at a later date. Amazon DocumentDB retains this final user-created snapshot along with all other manually created snapshots after the cluster is deleted.
Resiliency
Open allAmazon DocumentDB automatically divides your storage volume into 10 GiB segments spread across many disks. We make your data durable across three Availability Zones (AZs) and you only pay for one copy. Amazon DocumentDB is designed to transparently handle the loss of up to two copies of data without affecting write availability and up to three copies without affecting read availability. Amazon DocumentDB storage volume is also self-healing. Data blocks and disks are continuously scanned for errors and repaired automatically.
Unlike other databases, after a database crash, Amazon DocumentDB does not need to replay the redo log from the last database checkpoint (typically five minutes) and confirm that all changes have been applied before making the database available for operations. This reduces database restart times to less than 60 seconds in most cases. Amazon DocumentDB moves the cache out of the database process and makes it available immediately at restart time. This prevents you from having to throttle access until the cache is repopulated to avoid brownouts.
Amazon DocumentDB supports read replicas, which share the same underlying storage volume as the primary instance. Updates made by the primary instance are visible to all Amazon DocumentDB replicas. You can configure up to 15 read replicas. Replication is asynchronous and typically completes in milliseconds, with low impact on the performance of the primary instance. To learn more, see Amazon DocumentDB High availability and replication.
Yes, you can replicate your data across Regions using the