Database Migration Guide

MongoDB Atlas to Amazon DocumentDB: Migration Guide and Comparison

An honest guide to MongoDB Atlas vs Amazon DocumentDB — covering compatibility gaps, migration steps with AWS DMS, cost comparison, and when each service is the right choice.

Ask AI: ChatGPT Claude Perplexity Gemini

MongoDB Atlas to Amazon DocumentDB is one of the most nuanced database migrations you can undertake. On the surface it looks straightforward — DocumentDB speaks the MongoDB wire protocol, so your drivers connect. The complexity lives in the gaps between what DocumentDB advertises and what MongoDB actually delivers.

This guide does not sugarcoat the compatibility story. We will cover what works, what does not, when DocumentDB is a reasonable choice, and when you should stay on Atlas or consider a different AWS-native option.

We are an AWS Select Tier Consulting Partner, and we have handled Atlas-to-DocumentDB migrations. The advice here reflects production experience, not vendor documentation.

The Compatibility Gap: What DocumentDB Does Not Support

This is the section most vendor comparisons skip. Read it before you start planning a migration.

FeatureMongoDB AtlasAmazon DocumentDBNotes
Full-text searchAtlas Search (Lucene-powered)Not supportedUse Amazon OpenSearch Service alongside DocumentDB
Change streamsFull support, collection + database levelCollection-level only, with restrictionsNo db-level or deployment-level change streams
$lookup (join)Full support including uncorrelated subqueriesPartial — no uncorrelated subqueriesRewrite complex joins before migrating
$unionWithSupported (MongoDB 4.4+)Not supportedRequires application-level workaround
$accumulator / $functionSupportedNot supportedCustom JS aggregation operators unavailable
Time series collectionsMongoDB 5.0+Not supportedUse Timestream or Redshift for time series
MongoDB versionTracks upstream releases4.0 and 5.0 wire protocol onlyDoes not receive MongoDB feature releases
TransactionsMulti-document ACIDSingle-region only; no cross-collection in all configsReview transaction patterns carefully
Atlas Vector SearchSupportedNot supportedUse Amazon OpenSearch with k-NN instead
Atlas App ServicesSupportedNot availableNo DocumentDB equivalent

The bottom line on compatibility: For CRUD-heavy applications that do not use Atlas Search, complex aggregations, or change streams at the database level, DocumentDB’s wire protocol compatibility is adequate. For applications that use these features, you are not migrating to DocumentDB — you are rewriting parts of your application.

When DocumentDB Makes Sense

DocumentDB is a reasonable choice in specific situations:

When Atlas Is the Better Choice

Atlas is the stronger option when:

Cost Comparison

DocumentDB uses an unbundled pricing model. The instance price is only part of the cost.

TierMongoDB AtlasAmazon DocumentDBNotes
Dev/sharedM0: Free, M2: $9/month, M5: $25/monthNo free tier; minimum ~$43/month (db.t3.medium)Atlas is dramatically cheaper for dev
Entry productionM10: ~$57/month (2 vCPU, 2 GB)db.t3.medium: ~$55/month + I/O ($20–100/month)Comparable at this tier
Standard productionM30: ~$169/month (2 vCPU, 8 GB)db.r6g.large: ~$180/month + I/O ($50–200/month)DocumentDB I/O can exceed instance cost
Growth tierM40: ~$325/month (4 vCPU, 16 GB)db.r6g.xlarge: ~$360/month + I/O ($100–400/month)DocumentDB becomes expensive for write-heavy workloads
High performanceM60: ~$640/month (8 vCPU, 32 GB)db.r6g.2xlarge: ~$720/month + I/O ($200–800/month)I/O charges are the wildcard

Critical caveat: DocumentDB’s I/O pricing ($0.20 per 1M IOs) can easily exceed the instance cost for write-heavy workloads. Always calculate worst-case I/O volume before committing to DocumentDB.

Explore other technical comparisons:

Why Choose FactualMinds for Your AWS Migration

FactualMinds is an AWS Select Tier Consulting Partner specializing in cloud platform migrations. We have executed GCP, DigitalOcean, Heroku, and MongoDB migrations to AWS and know the pitfalls.


Frequently Asked Questions

Is Amazon DocumentDB the same as MongoDB?
No. Amazon DocumentDB implements a subset of the MongoDB 4.0 and 5.0 wire protocol, which means most MongoDB drivers and tools can connect to it. However, DocumentDB is a purpose-built AWS service — not MongoDB under the hood. It has documented gaps: limited change streams, partial $lookup support, no full-text search (use Amazon OpenSearch instead), and missing aggregation pipeline operators. For simple CRUD-heavy workloads the compatibility is sufficient; for feature-intensive applications it is not.
Can I migrate from MongoDB Atlas to DocumentDB?
Yes. The recommended path is AWS Database Migration Service (DMS), which supports MongoDB as a source and DocumentDB as a target. Before committing to the migration, audit your application code for any aggregation operators, change stream usage, or text search queries — these may need reworking. Run the DocumentDB compatibility checker on your queries before you start.
What are the limitations of Amazon DocumentDB?
The most significant limitations: no full-text search (Atlas Search uses Lucene; DocumentDB has none — use Amazon OpenSearch alongside DocumentDB instead), limited change stream support (only available at the collection level with restrictions), partial $lookup (no uncorrelated subqueries), and missing aggregation operators including $unionWith, $accumulator, and $function. DocumentDB also lags behind MongoDB version releases — it supports MongoDB 4.0 and 5.0 wire protocols but does not track upstream MongoDB feature releases.
Is DocumentDB cheaper than MongoDB Atlas?
It depends on your I/O patterns. DocumentDB uses an unbundled pricing model: you pay separately for instance hours, storage ($0.10/GB-month), and I/Os ($0.20/million). Atlas bundles everything into the instance price. At low I/O volumes, DocumentDB can be cheaper. At high I/O volumes (write-heavy workloads), the per-I/O charges can exceed Atlas pricing. Always model your expected I/O before assuming DocumentDB is cheaper.
Does DocumentDB support MongoDB 5.0?
DocumentDB supports the MongoDB 5.0 wire protocol for compatibility purposes, but this does not mean it supports all MongoDB 5.0 features. Specific 5.0 features like time series collections and window functions in aggregation pipelines are not available in DocumentDB. Check the AWS DocumentDB compatibility matrix for the specific features your application uses before migrating.

Ready to Migrate to AWS?

FactualMinds is an AWS Select Tier Consulting Partner. We run assessment-first migrations — mapping your current architecture, estimating risk, and executing with zero-downtime cutover strategies.