AWS Certified DevOps Engineer – Professional — Question 23

An n-tier application requires a table in an Amazon RDS MySQL DB instance to be dropped and repopulated at each deployment. This process can take several minutes and the web tier cannot come online until the process is complete. Currently, the web tier is configured in an Amazon EC2 Auto Scaling group, with instances being terminated and replaced at each deployment. The MySQL table is populated by running a SQL query through an AWS CodeBuild job.
What should be done to ensure that the web tier does not come online before the database is completely configured?

Answer options

Correct answer: D

Explanation

The correct answer, D, utilizes an EC2 Auto Scaling lifecycle hook, which effectively pauses the launch of the web tier until the database table has been populated, ensuring that the web tier does not come online prematurely. Options A and B do not directly address the timing of the web tier's availability relative to the database population. Option C, while useful for monitoring, does not provide a mechanism to prevent the web tier from starting before the database is ready.