Skip to main content

Amazon DocumentDB

MongoDB database features

MongoDB became popular with developers due to the its intuitive API, flexible data model, and features that include:

Ad-hoc queries

MongoDB supports field, range, and regular-expression queries which can return entire documents, specific fields of documents, or random samples of results.

Indexing

Fields in a MongoDB document can be indexed with primary and secondary indices. MongoDB supports a number of different index types, including single field, compound (multiple fields), multikey (array), geospatial, text, and hashed.

Replication

MongoDB provides high availability with replica sets including two or more copies of the data. Writes are handled by the primary replica while any replica is capable of serving read requests. If the primary replica fails, a secondary replica is promoted to become the primary replica. The Amazon DocumentDB documentation lists the supported MongoDB APIs, operations, and data types.

Running MongoDB workloads in Amazon DocumentDB (with MongoDB compatibility)

While the MongoDB document model offers flexibility, self-managing MongoDB databases is difficult, time-consuming, and expensive, especially as applications scale. AWS created Amazon DocumentDB (with MongoDB compatibility) as a serverless, fully managed, MongoDB-compatible document database service allowing you to use your existing MongoDB drivers, MongoDB clients, and tools with Amazon DocumentDB.

With Amazon DocumentDB, you can scale without having to plan, provision, or manage capacity. Also, as it's fully managed, you don't have to worry about database management tasks such as maintaining and patching database software, manually setting up and securing database clusters, running cluster management software, configuring backups, and monitoring production workloads.

You can migrate MongoDB workloads to Amazon DocumentDB using the AWS Database Migration Service (AWS DMS) and command line utilities like mongodump and mongorestore with step-by-step migration instructions in the documentation.

  

Advantages of running MongoDB workloads using Amazon DocumentDB

Amazon DocumentDB supports the MongoDB API, and there are specific benefits and advantages to running your MongoDB workloads on Amazon DocumentDB.

Scalability

Amazon DocumentDB Serverless automatically scales to any application's demands without any manual intervention, and removes the need to plan, provision, or manage capacity. It also decouples storage and compute, allowing each to scale independently so that you can easily scale read capacity to millions of requests per second. You can also increase the read capacity to millions of requests per second by adding up to 15 low latency read replicas in minutes, regardless of the size of your data.

High Availability and Durability

Amazon DocumentDB is designed for 99.99% availability and makes your data durable across three Availability Zones (AZs) within a Region. Continuous backup is enabled by default, and you can configure a retention period of up to 35 days with point-in-time restores (PITR) at a per-second granularity.

Security and Compliance

Amazon DocumentDB runs in Amazon VPC, which allows you to isolate your cluster in your own virtual network. It supports encryption at rest with AWS KMS, encryption in transit, role-based access control, and compliance certifications including PCI DSS, ISO 9001, 27001, 27017, and 27018, SOC 1, 2 and 3, and HITRUST, in addition to being HIPAA eligible.

Integrations with other AWS services

Amazon DocumentDB easily integrates with other AWS services to extend functionality, including Amazon CloudWatch for monitoring and alarms, AWS CloudTrail for audit logs, AWS Identity and Access Management (IAM) for resource permissions, AWS Lambda for event-driven architectures, AWS Key Management Service (KMS) for encryption keys, AWS Secrets Manager for secure password management, AWS Glue for ETL, Amazon OpenSearch Service for search analytics, and Amazon SageMaker Canvas for machine learning.