Amazon DocumentDB (with MongoDB compatibility) Documentation


MongoDB 3.6 and 4.0 compatible

Amazon DocumentDB is compatible with MongoDB 3.6 and 4.0 drivers and tools. Many of the applications, drivers, and tools that customers already use today with their MongoDB non-relational database can be used with Amazon DocumentDB with little or no change. Amazon DocumentDB emulates the responses that a client expects from a MongoDB server by implementing the Apache 2.0 open source MongoDB 3.6 and 4.0 APIs on a purpose-built, distributed storage system that is designed to give customers performance, scalability, and availability when operating MongoDB workloads at scale. 

ACID Transactions

With the launch of support for MongoDB 4.0 compatibility, Amazon DocumentDB supports the ability to perform ACID transactions across multiple documents, statements, collections, and databases.

Migration support

Customers can migrate their MongoDB databases on-premises or on Amazon EC2 to Amazon DocumentDB with minimal downtime using the AWS Database Migration Service (DMS). With DMS, you can migrate from a MongoDB replica set or from a sharded cluster to Amazon DocumentDB.


Provisioning and setup

You can get started with Amazon DocumentDB by launching a new Amazon DocumentDB cluster using the AWS Management Console. Amazon DocumentDB instances are pre-configured with parameters and settings appropriate for the instance class you have selected. You can launch a cluster and connect your application without additional configuration.

Monitoring and Metrics

Amazon DocumentDB is designed to provide Amazon CloudWatch metrics for your cloud database instances. You can use the AWS Management Console to view over 40 key operational metrics for your cluster, including compute, memory, storage, query throughput, MongoDB opcounters, and active connections.

Software Patching

Amazon DocumentDB is designed to keep your database up-to-date with the latest patches. You can control if and when your cluster is patched via Database Engine Version Management.

Performance at scale

High Throughput, Low Latency for Document Queries

Amazon DocumentDB has a flexible JSON document model, data types, and efficient indexing, and it uses a scale-up, in-memory architecture designed to allow for fast query evaluation over large sets of documents.

Scaling of Database Compute Resources

Through the AWS Management Console, you can scale the compute and memory resources, powering your cluster up or down, by creating new replica instances of the desired size or by removing instances. 

Storage that Scales

Amazon DocumentDB will grow the size of your storage volume as your cluster storage needs grow. Your storage volume will grow in increments of 10 GB up to a maximum of 64 TB. You don't need to provision excess storage for your NoSQL database to handle future growth.

Low Latency Read Replicas

You can increase read throughput to support high volume application requests by creating up to 15 database read replicas. Amazon DocumentDB replicas share the same underlying storage as the source instance. This feature is designed to free up more processing power to serve read requests and reduces the replica lag time. Amazon DocumentDB is also designed to provide a single endpoint for read queries, so the application can connect without having to keep track of replicas as they are added and removed.


Network Isolation

Amazon DocumentDB runs in Amazon VPC, which helps you to isolate your cluster in your own virtual network and connect to your on-premises IT infrastructure using encrypted IPsec VPNs. In addition, using Amazon DocumentDB’s VPC configuration, you can configure firewall settings and control network access to your cluster.


Amazon DocumentDB supports role-based access control (RBAC) with built-in roles. RBAC helps you to enforce least privilege by restricting the actions that users are authorized to perform. Amazon DocumentDB is integrated with AWS Identity and Access Management (IAM) and helps you control the actions that your AWS IAM users and groups can take on specific Amazon DocumentDB resources, including clusters, instances, snapshots, and parameter groups. In addition, you can tag your Amazon DocumentDB resources, and control the actions that your IAM users and groups can take on groups of resources that have the same tag (and tag value).


Amazon DocumentDB allows you to encrypt your databases using keys you create and control through AWS Key Management Service (KMS). 


Global Clusters

Amazon DocumentDB Global Clusters are designed to provide disaster recovery from region-wide outages and enable low-latency global reads. Amazon DocumentDB Global Clusters replicate your data to clusters in up to 5 AWS regions with minimal impact on performance.

Instance Monitoring and Repair

The health of your Amazon DocumentDB cluster and its instances are continuously monitored. If the instance powering your database fails, the instance and associated processes are restarted. It also isolates the database cache from database processes, allowing the cache to survive a database restart.

Multi-AZ Deployments with Read Replicas

You can configure Amazon DocumentDB to failover to one of up to 15 Amazon DocumentDB replicas you have created in any of three Availability Zones. If no Amazon DocumentDB replicas have been provisioned by you, in the case of a failure, Amazon DocumentDB will attempt to create a new instance for you.

Fault-tolerant Storage

Each 10GB portion of your storage volume is replicated six ways, across three Availability Zones. Amazon DocumentDB uses storage that is designed to transparently handle the loss of up to two copies of data without affecting database write availability and up to three copies without affecting read availability. Amazon DocumentDB’s storage data blocks and disks are periodically scanned for errors and replaced.

Continuous, Incremental Backups and Point-in-time Restore

Amazon DocumentDB's simple database backup capability enables point-in-time recovery for your clusters. This is designed to allow you to restore your cluster to any second during your retention period, up until the last five minutes. Your backup retention period can be configured up to thirty-five days. These backups are stored in Amazon S3.

Cluster Snapshots

Cluster snapshots are user-initiated backups of your cluster stored in Amazon S3 that will be kept until you delete them. They leverage the incremental snapshots to help reduce the time and storage required. You can create a new cluster from a Cluster Snapshot whenever you desire.

Additional Information

For additional information about service controls, security features and functionalities, including, as applicable, information about storing, retrieving, modifying, restricting, and deleting data, please see This additional information does not form part of the Documentation for purposes of the AWS Customer Agreement available at, or other agreement between you and AWS governing your use of AWS’s services.