Courseiva
Deployment and MigrationeasyMultiple ChoiceObjective-mapped

How to Migrate MongoDB to DocumentDB with Minimal Downtime Using AWS DMS

A company needs to migrate a 100 GB MongoDB database to Amazon DocumentDB (with MongoDB compatibility). The migration must have minimal impact on the source database performance. Which approach should the company take?

Quick Answer

The correct approach is to use AWS Database Migration Service (AWS DMS) with ongoing replication from the MongoDB source. This method leverages DMS’s change data capture (CDC) capability, which reads the MongoDB oplog to continuously capture and apply changes to Amazon DocumentDB without locking the source database, ensuring minimal performance impact even on a 100 GB production workload. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of live migration strategies versus batch export/import methods, which would cause significant downtime and source strain. A common trap is choosing a full snapshot or mongodump, but DMS with ongoing replication allows near-zero downtime by keeping the target synchronized until cutover. Memory tip: “Oplog equals ongoing” — if you see “minimal downtime” and “MongoDB to DocumentDB,” think DMS with CDC reading the oplog.

⚠ Common exam trap

Candidates often choose mongodump/mongorestore (Option D) as the simplest tool, overlooking that it causes significant source performance impact and downtime for large databases, while AWS DMS's CDC capability is specifically designed for minimal-impact migrations.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use AWS Database Migration Service (AWS DMS) with ongoing replication from the MongoDB source.

AWS DMS with ongoing replication is the correct approach because it supports continuous change data capture (CDC) from MongoDB, enabling a live migration with minimal performance impact on the source. DMS reads the MongoDB oplog to capture changes without locking the database, which is critical for a 100 GB production database. This allows the target DocumentDB to stay synchronized until cutover, reducing downtime and avoiding the need for a full export/import that would strain the source.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use AWS Database Migration Service (AWS DMS) with ongoing replication from the MongoDB source.

    Why this is correct

    AWS DMS supports ongoing change data capture (CDC) from MongoDB oplog, enabling continuous replication with minimal read overhead on the source. This satisfies the stem’s constraint of minimal performance impact, as CDC reads only the oplog rather than scanning the entire 100 GB collection, avoiding sustained load on the production database.

  • Use AWS DataSync to transfer the MongoDB data files.

    Why it's wrong here

    AWS DataSync is for file-based data, not for live database migration.

  • Set up a MongoDB replica set on Amazon EC2 and promote it to primary, then migrate to DocumentDB.

    Why it's wrong here

    This adds complexity and does not directly migrate to DocumentDB; it's an intermediate step.

  • Use mongodump to export the data and mongorestore to import into DocumentDB.

    Why it's wrong here

    Mongodump can impact source performance and may require downtime if consistency is needed.

About these practice questions

This DBS-C01 question is part of Courseiva's 1,663-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

8 more ways this is tested on DBS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is migrating a 5 TB MongoDB database to Amazon DocumentDB. They have a short maintenance window and need to minimize downtime. Which migration strategy should be used?

hard
  • A.Use AWS DMS to perform a full load and then ongoing replication from the source MongoDB.
  • B.Use the MongoDB change streams feature to replicate changes to DocumentDB in real time.
  • C.Set up AWS Direct Connect to the source and use mongorestore directly to DocumentDB.
  • D.Export the data using mongodump, transfer to Amazon S3, and import using mongorestore.

Why A: AWS DMS supports MongoDB as a source and Amazon DocumentDB as a target, enabling a full load of the 5 TB database followed by ongoing change data capture (CDC) using MongoDB's oplog. This minimizes downtime by keeping the target nearly synchronized during the migration window, allowing a final cutover with minimal interruption.

Variation 2. A company is migrating a MongoDB database to Amazon DocumentDB. They have a 200 GB database and need to minimize downtime. Which migration approach is most appropriate?

medium
  • A.Take an EBS snapshot of the MongoDB volume and restore it to DocumentDB.
  • B.Set up MongoDB replication from the source to DocumentDB, then promote DocumentDB.
  • C.Export the database using mongodump and import using mongorestore into DocumentDB.
  • D.Use AWS DMS to migrate data from MongoDB to DocumentDB.

Why D: AWS DMS with ongoing replication (change data capture) is the most appropriate migration approach for minimizing downtime when migrating a 200 GB MongoDB database to Amazon DocumentDB. DMS can perform an initial load and then continuously replicate ongoing changes from the source MongoDB to the target DocumentDB until cutover, resulting in near-zero downtime. Option B is incorrect because native MongoDB replication is not supported by DocumentDB; DocumentDB cannot join a MongoDB replica set.

Variation 3. A media company is migrating a 5 TB MongoDB database to Amazon DocumentDB. The migration must have minimal downtime. The source MongoDB uses sharding across 10 shards. Which migration strategy is MOST appropriate?

hard
  • A.Use native MongoDB replication to sync to DocumentDB
  • B.Use AWS DMS with MongoDB as source and DocumentDB as target, enabling CDC
  • C.Export data to S3 and use AWS Glue to load into DocumentDB
  • D.Use mongoexport to export data and mongoimport to import into DocumentDB

Why B: AWS DMS with CDC (Change Data Capture) is the most appropriate strategy because it supports ongoing replication from a sharded MongoDB source to Amazon DocumentDB, enabling near-zero downtime migration. DMS can handle the 5 TB dataset and 10 shards by using the MongoDB oplog to capture changes after the initial full load, ensuring minimal interruption to the media company's operations.

Variation 4. A company wants to migrate an on-premises MongoDB database to Amazon DocumentDB. The migration should be performed with minimal application changes. Which AWS service should be used?

easy
  • A.Amazon S3 Transfer Acceleration
  • B.AWS DataSync
  • C.AWS Schema Conversion Tool (AWS SCT)
  • D.AWS Database Migration Service (AWS DMS)

Why D: AWS DMS is the correct service because it supports homogeneous migrations from MongoDB to Amazon DocumentDB, including ongoing replication via change data capture (CDC) to minimize downtime. It handles schema conversion automatically for compatible data types, requiring minimal application changes since DocumentDB is MongoDB-compatible. AWS DMS can migrate data directly from a MongoDB source to a DocumentDB target without needing an intermediate schema transformation tool.

Variation 5. A company wants to migrate an on-premises MongoDB database to Amazon DocumentDB. The migration must be performed with minimal downtime and should support live data synchronization. Which AWS service should be used?

easy
  • A.AWS Glue with streaming ETL jobs.
  • B.AWS Data Pipeline to schedule periodic data loads.
  • C.AWS S3 with AWS Lambda functions to sync data.
  • D.AWS Database Migration Service (DMS) with ongoing replication.

Why D: AWS Database Migration Service (DMS) with ongoing replication is the correct choice because it supports continuous change data capture (CDC) from a source MongoDB database to Amazon DocumentDB, enabling live data synchronization with minimal downtime. DMS can perform a full load followed by ongoing replication using the MongoDB oplog to capture and apply changes in near real-time, which meets the requirement for minimal downtime during migration.

Variation 6. A company is migrating a 10 TB MongoDB database to Amazon DocumentDB. The migration must have minimal downtime. Which strategy should be used?

hard
  • A.Use mongodump to export the database and mongorestore to import into DocumentDB.
  • B.Use AWS CloudEndure to replicate the MongoDB server to DocumentDB.
  • C.Copy the database files to Amazon S3 and restore to DocumentDB.
  • D.Use AWS DMS with MongoDB as source and DocumentDB as target, with change data capture.

Why D: AWS DMS with MongoDB as source and DocumentDB as target, using change data capture (CDC), is the correct strategy because it enables a live migration with minimal downtime. DMS performs an initial full load of the 10 TB database and then continuously replicates ongoing changes from the MongoDB oplog, allowing you to cut over to DocumentDB with only a brief pause.

Variation 7. A company is migrating a 500 GB MongoDB database to Amazon DocumentDB. The migration must have minimal impact on the source database. Which approach should the company take?

medium
  • A.Use mongodump to export the data, then use mongorestore to import into DocumentDB.
  • B.Use mongoexport to export CSV, then use the DocumentDB import tool.
  • C.Use AWS Database Migration Service (DMS) with MongoDB as source and DocumentDB as target.
  • D.Use AWS Schema Conversion Tool (SCT) to convert schema, then copy data.

Why C: AWS DMS supports ongoing replication from MongoDB to Amazon DocumentDB, enabling a live migration with minimal impact on the source database. DMS uses the MongoDB oplog to capture changes continuously, so the source is only read during the initial load and then tailed for CDC, avoiding heavy locks or performance degradation.

Variation 8. A company is migrating an on-premises MongoDB database to Amazon DocumentDB. The migration must be online with minimal downtime. The source MongoDB is version 4.0 and uses replica sets. Which tool should the company use?

hard
  • A.Use MongoDB Compass to export data and import into DocumentDB.
  • B.Use mongodump and mongorestore.
  • C.Create a read replica of the MongoDB replica set and promote to DocumentDB.
  • D.Use AWS DMS with MongoDB as source and DocumentDB as target.

Why D: AWS DMS (Database Migration Service) supports continuous replication from MongoDB (including replica sets) to Amazon DocumentDB, enabling an online migration with minimal downtime. DMS uses the MongoDB oplog to capture ongoing changes, ensuring data consistency during the cutover. This is the only option that meets the requirement for an online migration with minimal downtime.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DBS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DBS-C01 exam.