Which solution will meet these requirements?
Create an API Gateway endpoint in the us-west-2 Region to direct traffic to the Lambda function in us-east-1. Configure Amazon Route 53 to use a failover routing policy to route traffic for the two API Gateway endpoints.
Create an Amazon Simple Queue Service (Amazon SQS) queue. Configure API Gateway to direct traffic to the SQS queue instead of to the Lambda function. Configure the Lambda function to pull messages from the queue for processing.
Deploy the Lambda function to the us-west-2 Region. Create an API Gateway endpoint in us-west-2 10 direct traffic to the Lambda function in us-west-2. Configure AWS Global Accelerator and an Application Load Balancer to manage traffic across the two API Gateway endpoints.
Deploy the Lambda function and an API Gateway endpoint to the us-west-2 Region. Configure Amazon Route 53 to use a failover routing policy to route traffic for the two API Gateway endpoints.
Explanations:
This option suggests creating an API Gateway in us-west-2 that directs traffic to the Lambda function in us-east-1. However, AWS Lambda functions cannot be directly invoked across regions by API Gateway, so this design does not provide a failover solution.
While using Amazon SQS could help with decoupling, it does not directly address the need for a failover solution across regions. SQS does not facilitate the automatic redirection of traffic to a different region’s Lambda function.
This option involves deploying a Lambda function and API Gateway in us-west-2 and using AWS Global Accelerator with an Application Load Balancer. However, Global Accelerator is not designed for managing failover between API Gateway endpoints; it primarily optimizes performance and availability of applications by routing traffic through the AWS global network.
This solution involves deploying both the Lambda function and an API Gateway endpoint in us-west-2 and configuring Route 53 with a failover routing policy. This setup allows traffic to be directed to the active region, providing a robust failover mechanism between us-east-1 and us-west-2.