AWS Certified Solutions Architect - Professional / Question #581 of 529

Question #581

A company hosts a web application using an Amazon API Gateway backed by AWS Lambda functions. The API Gateway is configured as the origin for an Amazon CloudFront distribution. The company uses Amazon Route 53 with an A record pointing to the CloudFront distribution. To ensure high availability and fault tolerance, which solution should be implemented?

A

Deploy a secondary Lambda function and API Gateway in another AWS Region. Update the Route 53 A record to a failover record set with both CloudFront distributions as targets, and configure health checks.

B

Deploy a secondary Lambda function and API Gateway in another AWS Region. Update the CloudFront distribution to add the new API Gateway as a second origin, then configure an origin group with primary and secondary failover settings.

C

Deploy a secondary Lambda function in another AWS Region and add it as a target to the existing API Gateway. Configure the API Gateway to use weighted routing for regional failover.

D

Deploy a secondary Lambda function and API Gateway in another AWS Region. Create a second CloudFront distribution for the new API Gateway, then use AWS Global Accelerator to route traffic to both distributions.

Explanation

Option B is correct because CloudFront's origin groups enable seamless failover between origins. By deploying a secondary API Gateway and Lambda in another region and configuring them as primary/secondary origins in CloudFront, traffic automatically switches to the secondary if the primary fails (based on health checks). This approach leverages CloudFront's built-in HA capabilities, ensuring faster failover than DNS-based solutions (Option A) and avoids single points of failure (Option C). Option D adds unnecessary complexity with Global Accelerator, as CloudFront already provides global distribution. Key points: CloudFront origin groups handle regional failover efficiently, avoiding DNS delays and simplifying architecture.

Answer

The correct answer is: B