AWS Certified Solutions Architect – Professional (SAP-C02) — Question 334
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 ideal service for migrating databases to AWS with minimal downtime, supporting Amazon DocumentDB as a target. By using change data capture (CDC), AWS DMS can replicate ongoing changes from the on-premises MongoDB source to the Amazon DocumentDB target. Other options, such as AWS Data Pipeline or AWS Glue, are not designed for live database replication, and deploying MongoDB on EC2 does not achieve the goal of migrating to Amazon DocumentDB.