What is MongoDB?

Non-relational database for JSON-like documents

MongoDB database features

MongoDB has become popular with developers in part 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. Learn more about MongoDB APIs, Operations, and Data Types supported in Amazon DocumentDB in the documentation.

Running MongoDB workloads in Amazon DocumentDB (with MongoDB compatibility)

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

As a fully managed AWS database service, Amazon DocumentDB allows you to set up, secure, and scale MongoDB-compatible databases in the cloud without worrying about 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.

Learn more about migrating MongoDB databases to Amazon DocumentDB (with MongoDB compatibility).

Advantages of running MongoDB workloads in Amazon DocumentDB (with MongoDB compatibility)

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

Scalability

Amazon DocumentDB 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 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. In Amazon DocumentDB, continuous backup is enabled by default, providing 1 day of point-in-time restore (PITR).

Security and Compliance

Amazon DocumentDB runs in Amazon VPC, which allows you to isolate your cluster in your own virtual network. Amazon DocumentDB 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.

AWS Service Integration

Amazon DocumentDB easily integrates with other AWS services to extend functionality, including Amazon CloudWatch for monitoring and alarms, AWS CloudTrail for audit logs, AWS Glue for ETL, and AWS Secrets Manager to name a few.

AWS re:Invent 2019: Amazon DocumentDB deep dive (DAT326)

Amazon DocumentDB continues to improve compatibility with MongoDB workloads by working backwards from the capabilities our customers ask us to build. To learn more about the advantages of DocumentDB for MongoDB workloads, watch the AWS re:Invent presentation, Amazon DocumentDB Deep Dive.