AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 205
A company needs to implement failover for its application. The application includes an Amazon CloudFront distribution and a public Application Load Balancer (ALB) in an AWS Region. The company has configured the ALB as the default origin for the distribution.
After some recent application outages, the company wants a zero-second RTO. The company deploys the application to a secondary Region in a warm standby configuration. A DevOps engineer needs to automate the failover of the application to the secondary Region so that HTTP GET requests meet the desired RTO.
Which solution will meet these requirements?
Answer options
- A. Create a second CloudFront distribution that has the secondary ALB as the default origin. Create Amazon Route 53 alias records that have a failover policy and Evaluate Target Health set to Yes for both CloudFront distributions. Update the application to use the new record set.
- B. Create a new origin on the distribution for the secondary ALCreate a new origin group. Set the original ALB as the primary origin. Configure the origin group to fail over for HTTP 5xx status codes. Update the default behavior to use the origin group.
- C. Create Amazon Route 53 alias records that have a failover policy and Evaluate Target Health set to Yes for both ALBs. Set the TTL of both records to 0. Update the distribution's origin to use the new record set.
- D. Create a CloudFront function that detects HTTP 5xx status codes. Configure the function to return a 307 Temporary Redirect error response to the secondary ALB if the function detects 5xx status codes. Update the distribution's default behavior to send origin responses to the function.
Correct answer: B
Explanation
The correct answer is B because it effectively creates a failover mechanism by utilizing an origin group that can switch to the secondary ALB upon detecting HTTP 5xx errors, ensuring high availability. Option A is not suitable as it requires maintaining two separate CloudFront distributions, which complicates management. Option C is incorrect because while it suggests using Route 53 for failover, it does not address the need for handling HTTP 5xx errors specifically. Option D is also inadequate since it relies on a function to handle redirects instead of a reliable failover setup.