Question #636
A company operates a serverless application where an Amazon API Gateway in the eu-west-1 region triggers an AWS Lambda function. The current setup lacks regional redundancy. A solutions architect must redesign the architecture to enable automatic failover to another AWS Region in case of an outage. Which solution meets these requirements?
Set up a new API Gateway in eu-central-1 that invokes the existing Lambda function in eu-west-1. Use Amazon Route 53 with failover routing to direct traffic between the two API Gateways.
Implement an Amazon SNS topic to handle incoming requests. Configure the Lambda function to process messages from the SNS topic. Replicate the SNS topic and Lambda function in eu-central-1 and use Route 53 for DNS failover.
Deploy the Lambda function in eu-central-1 and create an API Gateway there. Use AWS Global Accelerator with an Application Load Balancer to distribute traffic across both regions.
Deploy the Lambda function and API Gateway in eu-central-1. Configure Amazon Route 53 with a failover routing policy to route traffic between the two API Gateway endpoints in each region.
Explanation
Option D is correct because it replicates the entire architecture (API Gateway + Lambda) in a secondary region (eu-central-1) and uses Amazon Route 53 with a failover routing policy. Route 53 monitors the health of the primary region (eu-west-1) and automatically redirects traffic to the secondary region during an outage. This ensures full regional redundancy and meets the requirement for automatic failover.
Other options are incorrect:
- A: The Lambda function remains only in eu-west-1, so a regional outage would still cause failure.
- B: Replacing API Gateway with SNS changes the architecture unnecessarily and introduces complexity.
- C: Using ALB instead of API Gateway alters the original serverless design and may not integrate seamlessly with Lambda.
Key Points:
1. Regional redundancy requires replicating all components (API Gateway + Lambda) in another region.
2. Route 53 failover routing policies enable automatic DNS-level traffic redirection based on health checks.
3. Serverless architectures should maintain consistency (e.g., API Gateway + Lambda) across regions for simplicity and reliability.
Answer
The correct answer is: D