nerdexam
Amazon

SAP-C02 · Question #590

A company is running an application on Amazon EC2 instances in the AWS Cloud. The application is using a MongoDB database with a replica set as its data tier. The MongoDB database is installed on…

The correct answer is B. Create an AWS Database Migration Service (AWS DMS) replication instance. Create a source. The goal is to migrate an on-premises MongoDB replica set, accessible via Direct Connect, to Amazon DocumentDB (with MongoDB compatibility).

Submitted by ravi_2018· Mar 6, 2026Migrate Workloads and Modernize Solutions

Question

A company is running an application on Amazon EC2 instances in the AWS Cloud. The application is using a MongoDB database with a replica set as its data tier. The MongoDB database is installed on systems in the company's on-premises data center and is accessible through an AWS Direct Connect connection to the data center environment. A solutions architect must migrate the on-premises MongoDB database to Amazon DocumentDB (with MongoDB compatibility). Which strategy should the solutions architect choose to perform this migration?

Options

  • ACreate a fleet of EC2 instances. Install MongoDB Community Edition on the EC2 instances, and
  • BCreate an AWS Database Migration Service (AWS DMS) replication instance. Create a source
  • CCreate a data migration pipeline by using AWS Data Pipeline. Define data nodes for the on-
  • DCreate a source endpoint for the on-premises MongoDB database by using AWS Glue crawlers.

How the community answered

(21 responses)
  • B
    90% (19)
  • C
    5% (1)
  • D
    5% (1)

Why each option

The goal is to migrate an on-premises MongoDB replica set, accessible via Direct Connect, to Amazon DocumentDB (with MongoDB compatibility).

ACreate a fleet of EC2 instances. Install MongoDB Community Edition on the EC2 instances, and

Creating a fleet of EC2 instances and installing MongoDB Community Edition is a lift-and-shift of the database to EC2, not a migration to the fully managed Amazon DocumentDB service.

BCreate an AWS Database Migration Service (AWS DMS) replication instance. Create a sourceCorrect

AWS Database Migration Service (DMS) is the dedicated service for migrating databases to AWS, including migrating from an on-premises MongoDB database (source endpoint) to Amazon DocumentDB (target endpoint). DMS supports both full load and continuous replication (CDC) to minimize downtime during migration.

CCreate a data migration pipeline by using AWS Data Pipeline. Define data nodes for the on-

AWS Data Pipeline is designed for data processing and movement between different AWS services and on-premises sources/destinations, but it's not optimized for live database migrations with change data capture like AWS DMS.

DCreate a source endpoint for the on-premises MongoDB database by using AWS Glue crawlers.

AWS Glue crawlers are used to discover the schema and populate the AWS Glue Data Catalog, which is useful for analytics but does not perform database migrations from an on-premises MongoDB to DocumentDB.

Concept tested: Database Migration to DocumentDB

Source: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html

Community Discussion

No community discussion yet for this question.

Full SAP-C02 Practice