Blog
{Blog}  See what’s new with MongoDB 6.0 — and why you’ll want to upgrade today >>

Comparing Amazon DocumentDB and MongoDB

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 and runs no MongoDB code. Rather it emulates the MongoDB API, and runs on top of Amazon’s proprietary back-end platform. This creates significant architectural constraints, functionality limitations, and broken compatibility.

It is supported only on AWS and limited to up to 64TB of storage per cluster. The instance sizes start only from 4GB RAM and 2 CPUs.

What is MongoDB Atlas?

MongoDB offers the fully managed, on-demand, and global MongoDB Atlas service, in a public cloud of your choice. Atlas enables customers to deploy, operate, and scale MongoDB databases on AWS, Azure, Google Cloud, or any combination of those three. 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, enabling users to take advantage of the latest MongoDB features (including auto-scaling and sharding for scale-out).
  • Security features for data protection, through network isolation, fine-grained access control, auditing, end-to-end encryption, and more.
  • 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.
  • Fully integrated native MongoDB data visualization tools via MongoDB Charts.
  • Fully integrated MongoDB Atlas Data Lake which allows you to quickly and easily query data in any format on Amazon S3 using the MongoDB Query Language (MQL) and tools, unlocking value from your data faster.
  • Fully managed backups with point in time recovery to protect against data corruption, and the ability to query backups in-place without full restores.
  • Fine-grained monitoring and customizable alerts for comprehensive performance visibility.
  • Access to the Atlas App Services mobile application development platform, with Data Access Controls, Functions, Offline Sync, and Triggers delivered in a completely serverless model.
  • The Atlas Search service, which provides 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.
  • Versioned API to make upgrades risk-free, future-proofing your development and deployment.
  • Widespread coverage on the major cloud platforms with availability in about 80 cloud regions across Amazon Web Services, Microsoft Azure, and Google Cloud. without compromising critical functionality or risking lock-in. This includes multi-cloud clusters, with workloads distributed across providers.

Built and run by the same team that develops the MongoDB Database, MongoDB Atlas is the best way to run MongoDB apps.

Differences Between DocumentDB and MongoDB

The following high-level diagram compares a potential application stack using DocumentDB or MongoDB as their Data-as-a-Service tier.

High level visual description of the DocumentDB and MongoDB Atlas architectures

The key differences between DocumentDB and MongoDB’s on-demand, elastic, and fully managed Atlas service are summarized below.

Amazon DocumentDBMongoDB Atlas
Fully compatible with MongoDB

No, incomplete Imitation API fails 70% of correctness tests

Support for latest MongoDB version

No

Feature set resembles MongoDB 3.0/3.2, released in 2015.

Free Tier Support

Yes, limited

30 day free trial period

Pause and Resume ClustersYes
Scale writes and partition data beyond a single node / Sharding support

No

No sharding, single primary only. Largest instance supports 30,000 concurrent connections.

Replicate and scale beyond a single region / Comply with data locality regulations and survive regional outages

Yes, limited

Single primary constrained to a single region, with up to 16 cross-region replicas

High resilience, rapid failure recovery, fast failover, retryable writes, multi-region

No

Up to 120-second failover, no retryable writes, no multi-region in a single cluster

Multi-statement distributed ACID transactions

Limited Ambiguous commits, poor error handling, small data sizes. Transactions across shards are not available as DocumentDB does not support sharding

Integrated text search, geospatial processing, graph traversals

No

Data must be replicated to multiple adjacent AWS services, driving up cost and complexity

Hedged Reads

Queries submitted to multiple replicas for consistent low latency

No

Online Archive

Automatically tier data out from database to cloud object storage (Amazon S3)

No
Integrated querying of data in Amazon S3

No

Data must be replicated to multiple adjacent AWS services, driving up cost and complexity

On-demand Materialized ViewsNo
Schema governance

No

Schema controls must be enforced in the app

Rich data types

Limited

With no decimal data type, DocumentDB lacks support for lossless processing of complex numeric data

Reactive, event-driven data pipelines

Limited

Change streams run against primary only and incur additional cost.

Support for role-based access control and authentication restrictions

Limited

Coarse-grained roles only

Client-side field level encryption for fine-grained separation of duties in the cloudNo
Availability of advanced developer and analysis toolsNo
Fine-grained monitoring telemetry and prescriptive performance recommendations

No

<50 metrics

Freedom from vendor lock-in

No

AWS only

Develop and run anywhere On your mobile device, on your laptop, in your own data center, and in hybrid configurations

No

AWS only

Mobile and Edge Sync

No

Data must be replicated to multiple adjacent AWS services, driving up cost and complexity

Access to MongoDB expertiseNo
Amazon DocumentDB
Fully compatible with MongoDB

No, incomplete Imitation API fails 70% of correctness tests

Support for latest MongoDB version

No

Feature set resembles MongoDB 3.0/3.2, released in 2015.

Free Tier Support

Yes, limited

30 day free trial period

Pause and Resume ClustersYes
Scale writes and partition data beyond a single node / Sharding support

No

No sharding, single primary only. Largest instance supports 30,000 concurrent connections.

Replicate and scale beyond a single region / Comply with data locality regulations and survive regional outages

Yes, limited

Single primary constrained to a single region, with up to 16 cross-region replicas

High resilience, rapid failure recovery, fast failover, retryable writes, multi-region

No

Up to 120-second failover, no retryable writes, no multi-region in a single cluster

Multi-statement distributed ACID transactions

Limited Ambiguous commits, poor error handling, small data sizes. Transactions across shards are not available as DocumentDB does not support sharding

Integrated text search, geospatial processing, graph traversals

No

Data must be replicated to multiple adjacent AWS services, driving up cost and complexity

Hedged Reads

Queries submitted to multiple replicas for consistent low latency

No

Online Archive

Automatically tier data out from database to cloud object storage (Amazon S3)

No
Integrated querying of data in Amazon S3

No

Data must be replicated to multiple adjacent AWS services, driving up cost and complexity

On-demand Materialized ViewsNo
Schema governance

No

Schema controls must be enforced in the app

Rich data types

Limited

With no decimal data type, DocumentDB lacks support for lossless processing of complex numeric data

Reactive, event-driven data pipelines

Limited

Change streams run against primary only and incur additional cost.

Support for role-based access control and authentication restrictions

Limited

Coarse-grained roles only

Client-side field level encryption for fine-grained separation of duties in the cloudNo
Availability of advanced developer and analysis toolsNo
Fine-grained monitoring telemetry and prescriptive performance recommendations

No

<50 metrics

Freedom from vendor lock-in

No

AWS only

Develop and run anywhere On your mobile device, on your laptop, in your own data center, and in hybrid configurations

No

AWS only

Mobile and Edge Sync

No

Data must be replicated to multiple adjacent AWS services, driving up cost and complexity

Access to MongoDB expertiseNo
MongoDB Atlas
Fully compatible with MongoDBYes
Support for latest MongoDB version

Yes

MongoDB 5.2

Free Tier Support

Yes

Storage: 512 MB, RAM: Variable

A free tier cluster never expires.

Pause and Resume ClustersYes
Scale writes and partition data beyond a single node / Sharding support

Yes

Largest Atlas instance supports 128,000 concurrent connections. Full sharding support.

Replicate and scale beyond a single region / Comply with data locality regulations and survive regional outages

Yes

Global clusters, with up to 50 replicas per shard across multiple regions

High resilience, rapid failure recovery, fast failover, retryable writes, multi-region

Yes

Typical failover of 5 seconds, failed reads and writes auto-retried, cluster distributed across multiple regions, including across multiple cloud providers

Multi-statement distributed ACID transactionsYes
Integrated text search, geospatial processing, graph traversals

Yes

All available from a single API and platform

Hedged Reads

Queries submitted to multiple replicas for consistent low latency

Yes

Online Archive

Automatically tier data out from database to cloud object storage (Amazon S3)

Integrated querying of data in Amazon S3
On-demand Materialized Views

Yes

$merge aggregation stage

Schema governance

Yes

JSON schema

Rich data typesYes
Reactive, event-driven data pipelines

Yes

MongoDB Change Streams and Atlas Triggers

Support for role-based access control and authentication restrictions

Yes
Client-side field level encryption for fine-grained separation of duties in the cloudYes
Availability of advanced developer and analysis tools

Yes

MongoDB Compass, Charts, BI Connector, Spark Connector

Fine-grained monitoring telemetry and prescriptive performance recommendations

Yes

More than 100 metrics. Performance Advisor for index and schema recommendations

Freedom from vendor lock-in

Yes

AWS, Azure, and Google Cloud. Fully-managed, on-demand service available on ~80 regions

Develop and run anywhere On your mobile device, on your laptop, in your own data center, and in hybrid configurations

Yes

Atlas App Services / MongoDB Server / multi-cloud clusters in Atlas

Mobile and Edge Sync
Access to MongoDB expertise

Yes

Hundreds of engineers with multi-year MongoDB development, support, and consulting experience.

For additional MongoDB Atlas comparison information, please refer to the following section.

Is DocumentDB Compatible with MongoDB?

DocumentDB claims to support the MongoDB 4.0 API, which implies that it is at parity with MongoDB v4.0, released back in June 2018. In actual fact, the DocumentDB 4.0 feature set still closely resembles early MongoDB 3.0 and 3.2, released in 2015, and compatibility testing reveals it fails 66% of the MongoDB API correctness tests. 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.

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.

FAQs

Is DocumentDB really MongoDB?

No. DocumentDB is an Amazon database service with a partially compatible emulation of an old MongoDB API.

For more on this, check out https://isdocumentdbreallymongodb.com.

What is the difference between MongoDB and DocumentDB?

There are a large number of key differences and advantages to MongoDB Atlas over DocumentDB. Those are listed in the table above.

Does Amazon’s DocumentDB use MongoDB?

DocumentDB is not based on the MongoDB server and runs no MongoDB code.

Which database is DocumentDB based on?

DocumentDB is based on Amazon’s Aurora backend platform.

Is MongoDB Atlas free?

MongoDB Atlas offers a free cluster tier which never expires, giving you the ability to try out the database for your application as long as you wish. Amazon DocumentDB offers a limited free trial period which will expire after 30 days.

Is DocumentDB a relational database?

No. DocumentDB is a NoSQL document database.