A web application serves static content from an S3 bucket behind CloudFront and dynamic content via an ALB routing to EC2 Auto Scaling groups. The domain is in Route 53. During peak times some users receive HTTP 503 Service Unavailable errors from the ALB. The company wants to show a custom error page immediately when this error occurs, with minimal operational overhead. Which solution meets the requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a CloudFront origin group with two origins: set the ALB endpoint as primary and an S3 static website hosting the custom error page as secondary. Enable origin failover on the CloudFront distribution and upload the custom error page to the S3 static website..
Why this is the answer
The correct solution leverages CloudFront's origin failover capabilities. By creating an origin group with the ALB as the primary origin and an S3 bucket hosting the custom error page as the secondary origin, CloudFront automatically serves the custom error page from S3 when the ALB returns an HTTP 503 error. This is a built-in feature of CloudFront, offering immediate failover with minimal operational overhead. Incorrect options: Route 53 failover to an S3 bucket endpoint would require the entire domain to fail over, not just specific error responses, and wouldn't be immediate for individual 503s from the ALB. Creating a second CloudFront distribution and using Route 53 failover is an active-passive setup for the entire application, not for specific error handling within a single distribution. CloudFront Functions can modify responses but reading from an S3 bucket and serving a page on a 503 error would add complexity and latency compared to native origin failover.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed