Q18 — AWS SAP-C02 Ch.1
Question 18 of 75 | ← Chapter 1
Q93. A company has an asynchronous HTTP application that is hosted as an AWS Lambda function.A public Amazon API Gateway endpoint invokes the Lambda function. The Lambda function and the API Gateway endpoint reside in the us-east-1 Region.A solutions architect needs to redesign the application to support failover to another AWS Region.Which solution will meet these requirements?
- A. 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 53to use a failover routing policy to route traffic for the two API Gateway endpoints.
- B. 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.
- C. Deploy the Lambda function to the us-west-2 Region. Create an API Gateway endpoint in us-west-2 to 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.
- D. Deploy the Lambda function and an API Gateway endpoint to the us-west-2 Region. Configure Amazon Route 53to use a failover routing policy to route traffic for the two API Gateway endpoints. ✓
Correct Answer: D. Deploy the Lambda function and an API Gateway endpoint to the us-west-2 Region. Configure Amazon Route 53to use a failover routing policy to route traffic for the two API Gateway endpoints.
Explanation
To redesign the application to support failover to another AWS Region for an asynchronous HTTP application hosted as an AWS Lambda function, the solution that meets these requirements is: D. 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. In this solution, the Lambda function is deployed in the us-west-2 Region along with an API Gateway endpoint. By configuring Amazon Route 53 with a failover routing policy, traffic can be routed to the us-west-2 endpoint if the us-east-1 endpoint becomes unavailable. This provides failover capability by routing traffic to a different region in case of a failure.Currently, the default API endpoint type in API Gateway is the edge-optimized API endpoint, which enables clients to access an API through an Amazon CloudFront distribution. This typically improves connection time for geographically diverse clients. By default, a custom domain name is globally unique and the edge-optimized API endpoint would invoke a Lambda function in a single region in the case of Lambda integration. You can’t use this type of endpoint with a Route 53 active-active setup and fail-over.The new regional API endpoint in API Gateway moves the API endpoint into the region and the custom domain name is unique per region. This makes it possible to run a full copy of an API in each region and then use Route 53 to use an active-active setup and failover. Option A is not correct because the Lambda is in us-ease-1 but api gateway is in us-west-2. cannot cross regionsOption B is not correct because it uses a SQS queue as a buffer between the API Gateway and the Lambda function, but this does not provide failover to another region. In addition, it would also increase the latency of the system as the SQS will act as an additional layer.Option C is not correct because it deploys the Lambda function to the us-west-2 Region and creates an API Gateway endpoint in