Arch_Amazon DocumentDB_64 imageIcon source: AWS
CLOUD SERVICE · AWS

Amazon DocumentDB (with MongoDB compatibility)

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 →

What is Amazon DocumentDB (with MongoDB compatibility)

Read the extensive description

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. 

 

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. 

 

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.

Key Amazon DocumentDB (with MongoDB compatibility) Features

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.

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.

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.

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.

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.

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.

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.

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.

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.

Amazon DocumentDB (with MongoDB compatibility) Use Cases

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.

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.

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.

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.

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.

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.

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.

Amazon DocumentDB (with MongoDB compatibility) pricing models

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.

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

You are billed for the I/O operations you perform in your Amazon DocumentDB clusters, specifically read and write operations, and the pricing is based on the volume of I/O requests.

On-Demand Instances

With on-demand pricing, there is no upfront cost or long-term commitment required. You pay by the hour for each instance that you launch, and the pricing varies based on the instance size and region.

Reserved Instances

Reserved instances allow you to reserve a specific instance configuration for a one or three-year term, and in return, you receive a significant discount compared to on-demand prices. There are options for partial upfront payment, full upfront payment, or no upfront payment.

Services Amazon DocumentDB (with MongoDB compatibility) integrates with

Amazon EC2 image Amazon EC2

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

Open Amazon EC2 →
Amazon CloudWatch image Amazon 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.

Open Amazon CloudWatch →
AWS Identity and Access Management image AWS Identity and Access Management (IAM)

Amazon DocumentDB uses IAM for controlling access to the database instances and operations. This enables fine-grained access control for enhanced security.

Open AWS Identity and Access Management (IAM) →
AWS Lambda image AWS 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.

Open AWS Lambda →
Amazon Simple Storage Service image Amazon S3

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

Open Amazon S3 →