Q31 — AWS DOP-C02 Ch.3
Question 31 of 100 | ← Chapter 3
A company has an application using an Amazon Aurora MySQL-compatible multi-AZ DB cluster as its database. A cross-Region read replica has been created for disaster recovery purposes. A DevOps engineer wants to automatically promote the replica so it becomes the primary DB instance upon failure.
- A. Configure a latency-based Amazon Route 53 CNAME with health checks pointing to the primary and replica endpoints. Subscribe an Amazon SNS topic to Amazon RDS failure notifications from AWS CloudTrail and trigger an AWS Lambda function via that topic to promote the replica instance to primary.
- B. Create an Aurora custom endpoint pointing to the primary DB instance. Configure the application to use this endpoint. Configure AWS CloudTrail to invoke an AWS Lambda function to promote the replica instance and modify the custom endpoint to point to the newly promoted instance.
- C. Create an AWS Lambda function to modify the application's AWS CloudFormation template to promote the replica, apply the template update to the stack, and reconfigure the application to point to the newly promoted instance. Create an Amazon CloudWatch alarm to trigger this Lambda function after a failure event.
- D. Store the Aurora endpoint in AWS Systems Manager Parameter Store. Create an Amazon EventBridge (Amazon CloudWatch Events) event to detect database failure and run an AWS Lambda function to promote the replica instance and update the endpoint URL stored in AWS Systems Manager Parameter Store. Code the application to reload the endpoint from Parameter Store upon database connection failure. ✓
Correct Answer: D. Store the Aurora endpoint in AWS Systems Manager Parameter Store. Create an Amazon EventBridge (Amazon CloudWatch Events) event to detect database failure and run an AWS Lambda function to promote the replica instance and update the endpoint URL stored in AWS Systems Manager Parameter Store. Code the application to reload the endpoint from Parameter Store upon database connection failure.
Explanation
Answer D is correct. EventBridge is required to detect database failure. Lambda is needed to promote the replica because it resides in another Region (manual promotion otherwise). Storing and updating the endpoint in Parameter Store is critical for updating the application. See Aurora FAQ section on high availability: https://aws.amazon.com/rds/aurora/faqs/