Amazon DocumentDB (with MongoDB compatibility)
Cloud service · AWS

Amazon DocumentDB (with MongoDB compatibility)

In short

Amazon DocumentDB (with MongoDB compatibility) is a fully managed, scalable, and highly available document database service designed to be compatible with MongoDB workloads, allowing you to use MongoDB tools and drivers for managing and querying your data.

Cloud Services Hub →

8 key features of Amazon DocumentDB (with MongoDB compatibility)

Amazon DocumentDB (with MongoDB compatibility) offers MongoDB compatibility, scaling capabilities, managed services, high availability and durability, performance efficiency, robust security features, seamless AWS integrations, and point-in-time recovery.

01
MongoDB Compatibility

Amazon DocumentDB is designed to be compatible with MongoDB, allowing users to use their existing MongoDB drivers and tools. It supports the same MongoDB application code, drivers, and tools that you already use.

02
Scalability

The service provides the ability to scale compute and storage resources with ease, ensuring that your database can grow as your application's needs increase, without any downtime.

03
Managed Service

As a fully managed service, Amazon DocumentDB handles time-consuming tasks such as hardware provisioning, setup, patching, and backups, enabling developers to focus more on their applications rather than the underlying database management.

04
High Durability and Availability

DocumentDB ensures high durability and availability by automatically replicating six copies of your data across three AWS Availability Zones and continuously backing up your data to Amazon S3.

05
Performance Efficiency

Amazon DocumentDB provides fast and predictable performance with seamless scaling. It separates storage and compute, allowing each to scale independently, so you pay only for the resources you use.

06
Security

Security is a top priority, with features like network isolation using Amazon VPC, encryption at rest using keys you create and control through AWS Key Management Service (KMS), and encryption-in-transit with TLS.

07
Fully Integrated with AWS Services

DocumentDB integrates with other AWS services, like AWS Identity and Access Management (IAM) for authentication, AWS CloudWatch for monitoring, and AWS Lambda for triggering workflows in response to database events.

08
Point-in-time Recovery

Amazon DocumentDB provides the ability to restore your database to any second during your retention period, up to the last five minutes, which helps protect your databases from accidental deletion or writes.

Where Amazon DocumentDB (with MongoDB compatibility) is used

Amazon DocumentDB (with MongoDB compatibility) excels in web application data management, user profiles and personalization, CMS, catalog and inventory management, gaming backend services, and IoT data storage, offering a highly scalable, available, and managed document database solution.

  1. 01
    Web Application Data Management

    Amazon DocumentDB is well suited for web applications that require a scalable, highly available, and managed database service with MongoDB compatibility. This enables developers to focus on application logic rather than operational burden while leveraging familiar MongoDB tools and drivers for their document storage needs.

  2. 02
    User Profiles and Personalization

    This use case revolves around storing and retrieving user data such as preferences, profile information, and activity logs. Amazon DocumentDB's document-oriented structure is ideal for handling the semi-structured or unstructured nature of user-generated data, allowing for flexible data modeling and real-time personalization.

  3. 03
    Content Management Systems (CMS)

    Amazon DocumentDB provides a backend for CMS by stowing large volumes of content in various formats. Its capability to store diverse documents and perform fast queries allows creators to manage digital content efficiently, enhancing the ability to deliver dynamic user experiences.

  4. 04
    Catalog and Inventory Management

    E-commerce platforms can utilize Amazon DocumentDB's scalability and flexibility to manage extensive product catalogs, inventory, and complex hierarchical data. The database's performance and easy scaling can accommodate fluctuating traffic patterns and inventory levels typical for online retail operations.

  5. 05
    Gaming Backend Services

    For gaming applications that require high throughput and low latency for player data and game state management, Amazon DocumentDB can serve as a reliable backend. It supports the rapid and unpredictable scaling needs of gaming applications, ensuring a smooth player experience regardless of user load.

  6. 06
    Internet of Things (IoT) Data Storage

    Amazon DocumentDB can be utilized to store and process large streams of IoT device data. With its ability to handle high volumes of data ingestion and real-time analytics, it is an ideal choice for IoT applications that need to make instant decisions based on sensor data.

How Amazon DocumentDB (with MongoDB compatibility) is priced

Amazon DocumentDB offers on-demand and reserved instances with varying pricing based on instance size, region, and payment options, and it also charges for backup storage, data transfer, and I/O operations.

On-Demand Instances

With on-demand pricing, there is no upfront cost or long-term commitment required. 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.

Backup Storage

Backup storage pricing is based on the amount of backup storage that exceeds the free tier limit, which corresponds to the storage size of your Amazon DocumentDB cluster. Costs are incurred for the backup storage space you use beyond the allotted amount.

Data Transfer

Data transfer pricing applies to the data that moves in and out of Amazon DocumentDB across the internet or other AWS regions. Transfers within the same AWS region or to other services within the same region might be free, but other transfers are charged on a per GB basis.

I/O Operations

With Amazon DocumentDB Standard, I/O operations against the cluster storage volume are billed per million I/Os.

Database Savings Plans

Database Savings Plans offer savings in exchange for a commitment to a specific amount of eligible usage, measured in dollars per hour, over a one-year term.

Database Storage

Database storage is billed per GB-month consumed, including data, indexes, and change stream data, without requiring advance provisioning.

I/O-Optimized

The I/O-Optimized storage configuration includes database I/O operations rather than billing for them separately; charges apply for compute, database storage, and backup storage.

Serverless Capacity

Serverless compute capacity is measured in DocumentDB Capacity Units (DCUs) and billed per second. One DCU provides approximately 2 GiB of memory with corresponding CPU and networking.

Elastic Clusters Compute

Elastic Clusters compute is charged per vCPU-hour, with partial hours billed in one-second increments and a 10-minute charge following a billable status change. Total vCPUs equal the number of shards multiplied by nodes per shard and vCPUs per node.

Global Clusters Replicated Write I/O

Global Clusters charge for replicated write I/Os between the primary Region and each secondary Region, including when using I/O-Optimized storage. Each secondary Region is charged for a number of replicated write I/Os equal to the primary Region's in-region write I/Os.

Burstable Instance CPU Credits

T3 and T4g medium instances run in unlimited mode and incur CPU credit charges when average CPU utilization over a rolling 24-hour period exceeds the instance baseline. CPU credits cost $0.09 per vCPU-hour.

Extended Support

Extended Support for DocumentDB 3.6 adds charges based on instance family, Region, and vCPU-hours, with an 80% premium in years one and two and a 160% premium in year three. These charges are additional to normal database charges; Extended Support began March 31, 2026, and usage billing began July 1, 2026.

Free Trial

New DocumentDB customers are eligible for a 30-day trial including 750 hours of db.t3.medium usage, 30 million I/Os, 5 GB of storage, and 5 GB of backup storage. Standard on-demand rates apply after the trial or when allowances are exceeded; the trial is unavailable in AWS GovCloud (US) and China (Ningxia).

Services Amazon DocumentDB (with MongoDB compatibility) works with

Amazon EC2Amazon EC2

You can connect Amazon DocumentDB from Amazon EC2 instances in the same VPC for low-latency and secure connections.

Amazon S3Amazon S3

Amazon DocumentDB can store backups directly in Amazon S3 for data durability and recovery. Also, you can export your data to Amazon S3.

AWS LambdaAWS Lambda

You can use AWS Lambda functions to process data changes in Amazon DocumentDB. This can be useful for real-time data processing or triggers.

Amazon CloudWatchAmazon CloudWatch

Amazon DocumentDB integrates with Amazon CloudWatch for monitoring and logging. This allows you to track performance metrics, set alarms, and visualize data in real-time.

What is Amazon DocumentDB (with MongoDB compatibility)

3 min read

Amazon DocumentDB is a fully-managed NoSQL database service provided by Amazon Web Services (AWS) that offers compatibility with the MongoDB application programming interface (API). Introduced in 2019, Amazon DocumentDB is designed to handle large volumes of structured and semi-structured data with ease, offering scalability, durability, and reliability to developers and enterprises who wish to leverage the vast ecosystem of tools and applications designed for MongoDB, without the operational overhead associated with managing database clusters. 

At its core, Amazon DocumentDB is a document database, which means it stores data in JSON-like documents. This data structure supports complex, hierarchical data types, allowing developers to store and query their data using natural and expressive JSON queries. By providing MongoDB compatibility, DocumentDB enables developers who are familiar with MongoDB's query language to use similar syntax and operations, reducing the learning curve and facilitating easier migration of MongoDB workloads to DocumentDB. 

One of the major benefits of Amazon DocumentDB is its managed service nature, which abstracts away much of the administrative burden associated with traditional database management. AWS handles provisioning, patching, backup, recovery, failure detection, and repair, enabling developers to focus on creating applications rather than spending valuable time managing database infrastructure. Additionally, the service provides automated backups to Amazon Simple Storage Service (Amazon S3) and allows point-in-time recovery, adding an extra layer of data protection. 

Amazon DocumentDB excels in scalability, both in terms of storage and compute resources. It can scale to terabytes of data and allows customers to independently scale read and write resources to match their applications' workload demands. The service's architecture separates storage and compute, which means that compute capacity can be scaled up or down quickly without affecting storage capacity. 

Amazon DocumentDB Serverless is an alternative to choosing provisioned database resources. You specify a capacity range, and DocumentDB automatically adjusts compute capacity within that range as application demand changes. A mixed-configuration cluster can contain both Serverless and provisioned instances.

Amazon DocumentDB Elastic Clusters provide a sharded deployment model that partitions data across nodes to scale beyond the vertical limits of a single database. Elastic Clusters support hash-based partitioning.

The service places a strong emphasis on performance and availability. Amazon DocumentDB features a distributed, fault-tolerant, self-healing storage system that automatically and continuously replicates data across multiple AWS Availability Zones. This enhances availability and ensures that data is preserved even in the event of a system failure. The replication feature also allows for fast and consistent performance because read operations can be directed to multiple replicas in different Availability Zones, distributing the load and reducing latency. 

Clusters offer Standard and I/O-Optimized storage configurations. Standard is designed for low to moderate I/O consumption, while I/O-Optimized targets predictable costs and I/O-intensive applications; AWS identifies I/O costs exceeding 25% of database cluster spend as a reason to consider I/O-Optimized.

From a security standpoint, Amazon DocumentDB offers several mechanisms to protect data, including encryption at rest using keys you manage through AWS Key Management Service (KMS) and encryption in transit. Additionally, it integrates with AWS Identity and Access Management (IAM) to control the actions that different users can perform on the DocumentDB resources. 

Overall, Amazon DocumentDB is a robust and scalable database service that combines the flexibility of MongoDB's document model with the expansive infrastructure and security of AWS, offering an attractive solution for developers and organizations looking to manage their data in the cloud with minimal overhead.

Concepts related to Amazon DocumentDB (with MongoDB compatibility)

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.