Table of Contents:
- What is Amazon DocumentDB?
- What is MongoDB Atlas?
- Is Amazon DocumentDB Compatible with MongoDB?
- Additional Resources
- FAQs
There may seem to be multiple options for deploying MongoDB in the cloud. Amazon DocumentDB, for example, claims to be an AWS-native database with full support for the MongoDB API. While this managed solution supports some MongoDB features, it is important to note that DocumentDB is not fully compatible. The only place to access fully featured MongoDB as a service on AWS is through MongoDB Atlas.
In this comparison, we’ll explain the differences between Amazon DocumentDB and MongoDB Atlas, focusing on the following key areas:
- Compatibility: Amazon claims that migrating an application from MongoDB to DocumentDB is “as easy as changing the database endpoint to the new Amazon DocumentDB cluster”. We have debunked this by running a suite of compatibility tests that show DocumentDB is not fully compatible with the features and functionality available in MongoDB Atlas.
- Architecture: Amazon DocumentDB is built on top of a different platform than MongoDB, behaving more like a modern relational database. This has implications on scalability and the potential for adding more native MongoDB features in the future. DocumentDB can be deployed using elastic clusters, which impose additional operational constraints.
- Deployment: Amazon's DocumentDB relies on proprietary technology, and there is no way to run the database outside of AWS. Unlike MongoDB Atlas, which supports connections via a public endpoint, Amazon DocumentDB must be deployed within a virtual private cloud (VPC) to connect and operate.
- Developer productivity: Amazon DocumentDB lacks native integration with features or tools to support time series, search, and analytical use cases. Users must take on the operational burden of moving data out of DocumentDB and into other services in order to access features to support those workloads.
- Operational maturity: Database management and maintenance in Amazon DocumentDB is held back by limited tooling, a complex upgrade process, few backup options, and gaps in security features.
What is DocumentDB?
Amazon DocumentDB is a NoSQL JSON document database service with a limited degree of compatibility with MongoDB.
DocumentDB is not based on the MongoDB server. Rather it emulates the MongoDB API, and runs on top of a different platform. This creates significant architectural constraints, functionality limitations, and frequent incompatibility.
Interested in up-to-date results on DocumentDB's compatibility with the MongoDB API? Get the latest results at Is DocumentDB Really MongoDB?
The key differences between DocumentDB and MongoDB’s on-demand, elastic, and fully managed Atlas service are summarized below.
What is MongoDB Atlas?
MongoDB Atlas is a fully managed, on-demand, and global service in the public cloud. Atlas enables customers to deploy, operate, and scale MongoDB databases on and across multiple clouds—AWS, Azure, and Google Cloud. MongoDB Atlas is available through a pay-as-you-go model and billed on an hourly basis. It's easy to get started—use a simple GUI or programmatic API calls to select the public cloud provider, region, instance size, and features you need. MongoDB Atlas provides:
- Automated database and infrastructure provisioning along with auto-scaling so teams can get the database resources they need, when they need them, and can elastically scale in response to application demands.
- Security features to protect your data, with network isolation, fine-grained access control, auditing, and end-to-end encryption down to the level of individual fields, enabling you to comply with regulations such as ISO, HIPAA, and GDPR. Built-in replication both within and across regions for always-on availability.
- Global clusters for a fully managed, globally distributed database that provides low latency, responsive reads and writes to users anywhere, with strong data placement controls for regulatory compliance.
- Combined transactional and analytical capabilities with Atlas analytics nodes to isolate analytics queries from operational workloads while providing real-time insight. Native MongoDB analytics tools, such as MongoDB Charts and MongoDB Connectors (for SQL, Tableau, Power BI, and Spark), are configured to utilize analytics nodes by default. MongoDB's rich aggregation pipeline engine allows users to run expressive queries against their data.
- Fully integrated native MongoDB data visualization tools—MongoDB Charts, which supports the full richness of the document model, including nested, hierarchical, and geospatial data, with embedding and sharing capabilities. Quickly build visualizations of your data without needing to deploy or manage any software or infrastructure.
- Fully integrated MongoDB Atlas Data Federation, which allows users to quickly run federated queries across Atlas clusters and data stored on Amazon S3, Azure BLOB Storage, and Google Cloud Storage in many formats. The MongoDB Query Language (MQL) and tools allow users to get value from data faster.
- Fully managed backups with point-in-time recovery to protect against data corruption.
- Automatic data tiering, which helps lower costs by moving data to lower-cost storage such as Amazon S3, Azure BLOB Storage, and Google Cloud Storage.
- Fine-grained monitoring and customizable alerts for comprehensive performance visibility.
- Automated patching and single-click upgrades for new major versions of the database, enabling you to take advantage of the latest MongoDB features.
- Native time-series support optimized for both highly performant data ingestion and querying, along with reduced I/O and storage overhead.
- Full-text and vector search provide rich search capabilities against your fully managed databases with no additional infrastructure or systems to provision, manage, or scale.
- Live migration to move your self-managed MongoDB clusters into the Atlas service or to move Atlas clusters between cloud providers.
- Stable API to make upgrades risk-free, future-proofing your development.
- Widespread coverage on the major cloud platforms with availability in 125+ cloud regions across Amazon Web Services, Microsoft Azure, and Google Cloud. MongoDB Atlas delivers a consistent experience across each of the cloud platforms, ensuring developers can deploy wherever they need to, without compromising critical functionality or risking lock-in.
MongoDB Atlas is serving a vast range of workloads for startups, Fortune 500 companies, and government agencies, including mission-critical applications handling highly sensitive data in regulated industries. The developer experience across MongoDB Atlas and self-managed MongoDB is consistent, ensuring that you easily move from on-premises to the public cloud, and between providers as your needs evolve.
Built and run by developers, MongoDB Atlas is the best way to run MongoDB apps.
Is Amazon DocumentDB Compatible with MongoDB?
Amazon DocumentDB claims to support the MongoDB 8.0 API, which implies that it is at parity with MongoDB v8.0, released in October 2024. However, this is only partially true, as Amazon DocumentDB does not support the majority of MongoDB v8.0 differentiating features. Applications written for MongoDB will need to be rewritten to work with Amazon DocumentDB. However, since DocumentDB emulates a MongoDB API, applications written for DocumentDB can be easily migrated into MongoDB Atlas.
Additional Resources
Interested in migrating from DocumentDB to MongoDB Atlas? Please refer to our migration guide.
Interested in up-to-date results on DocumentDB's compatibility with the MongoDB API? Get the latest results at Is DocumentDB Really MongoDB?
Try MongoDB Atlas for free for a real MongoDB experience.