Q4 — AWS SAP-C02 Ch.3

Question 4 of 75 | ← Chapter 3

Q229. 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?

Correct Answer: 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.

Explanation

AWS DMS is a fully-managed service that makes it easy to migrate relational databases, non-relational databases, and other types of data stores to AWS. It supports migration from various sources, including MongoDB, and targets such as Amazon DocumentDB. Using CDC, the replication process can be continuous and near real-time, minimizing downtime and ensuring minimal data loss during the migration. Option A suggests creating a fleet of EC2 instances, installing MongoDB Community Edition on them, and configuring synchronous replication with the on-premises MongoDB database. This approach requires manual setup and configuration of the replication process and may not be the most efficient or cost- effective solution for migrating the database. Option C suggests using AWS Data Pipeline to create a data migration pipeline between the on-premises MongoDB database and Amazon DocumentDB. While Data Pipeline may be suitable for batch processing and transformation of data, it is not well-suited for real-time data migration like the one required in this scenario. Option D suggests using AWS Glue crawlers to create a source endpoint for the on-premises MongoDB database. However, AWS Glue crawlers are primarily used for extracting metadata from various sources and cannot migrate data between different databases. Therefore, Option B provides the best solution by using AWS DMS and its CDC feature to provide near real-time continuous replication from the on-premises MongoDB database to Amazon DocumentDB seamlessly.