AWS Certified Database – Specialty — Question 228
A company is migrating its 200 GB on-premises PostgreSQL database to Amazon Aurora PostgreSQL. The original database columns include NOT NULL and foreign key constraints. A database administrator needs to complete the migration while following best practices for database migrations.
Which option meets these requirements to migrate the database to AWS?
Answer options
- A. Use the AWS Schema Conversion Tool (AWS SCT) and AWS Database Migration Service (AWS DMS) to migrate the database to an Aurora PostgreSQL DB cluster.
- B. Create an AWS Lambda function to connect to the source database and load the data into the target Aurora PostgreSQL DB cluster.
- C. Use the PostgreSQL tools pg_dump and pg_restore to migrate to the Aurora PostgreSQL DB cluster.
- D. Create an Aurora PostgreSQL read replica and promote the read replica to become primary once it is synchronized.
Correct answer: A
Explanation
Option A is correct because using the AWS Schema Conversion Tool and AWS Database Migration Service allows for a seamless migration while ensuring that constraints like NOT NULL and foreign keys are preserved. Option B is not ideal as it does not follow best practices for database migrations. Option C, while functional, may not adequately handle constraints as well as the AWS tools. Option D is incorrect because creating a read replica is not a suitable approach for migrating an existing database while maintaining the required constraints.