AWS Certified Solutions Architect – Professional — Question 719
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?
Answer options
- A. Create a fleet of EC2 instances. Install MongoDB Community Edition on the EC2 instances, and create a database. Configure continuous synchronous replication with the database that is running in the on-premises data center.
- B. Create an AWS Database Migration Service (AWS DMS) replication instance. Create a source endpoint for the on-premises MongoDB database by using change data capture (CDC). Create a target endpoint for the Amazon DocumentDB database. Create and run a DMS migration task.
- C. Create a data migration pipeline by using AWS Data Pipeline. Define data nodes for the on-premises MongoDB database and the Amazon DocumentDB database. Create a scheduled task to run the data pipeline.
- D. Create a source endpoint for the on-premises MongoDB database by using AWS Glue crawlers. Configure continuous asynchronous replication between the MongoDB database and the Amazon DocumentDB database.
Correct answer: B
Explanation
AWS Database Migration Service (AWS DMS) is the standard and recommended tool for migrating relational databases and NoSQL databases like MongoDB to AWS managed services. By using a DMS replication instance with change data capture (CDC) enabled on the MongoDB source endpoint, the architect can perform a live migration to Amazon DocumentDB with minimal downtime. Other options like AWS Data Pipeline, AWS Glue, or building a custom EC2-based MongoDB replication scheme are either not designed for live database migrations or add unnecessary operational complexity.