SAP-C02 · Question #460
SAP-C02 Question #460: Real Exam Question with Answer & Explanation
The correct answer is C: Create a CloudFront origin group that has two origins. Set the ALB endpoint as the primary origin.. The company needs to display a custom error page immediately when an Application Load Balancer (ALB) returns HTTP 503 Service Unavailable errors, with the least operational overhead.
Question
A company runs a web application on AWS. The web application delivers static content from an Amazon S3 bucket that is behind an Amazon CloudFront distribution. The application serves dynamic content by using an Application Load Balancer (ALB) that distributes requests to a fleet of Amazon EC2 instances in Auto Scaling groups. The application uses a domain name setup in Amazon Route 53. Some users reported occasional issues when the users attempted to access the website during peak hours. An operations team found that the ALB sometimes returned HTTP 503 Service Unavailable errors. The company wants to display a custom error message page when these errors occur. The page should be displayed immediately for this error code. Which solution will meet these requirements with the LEAST operational overhead?
Options
- ASet up a Route 53 failover routing policy. Configure a health check to determine the status of the
- BCreate a second CloudFront distribution and an S3 static website to host the custom error page.
- CCreate a CloudFront origin group that has two origins. Set the ALB endpoint as the primary origin.
- DCreate a CloudFront function that validates each HTTP response code that the ALB returns.
Explanation
The company needs to display a custom error page immediately when an Application Load Balancer (ALB) returns HTTP 503 Service Unavailable errors, with the least operational overhead.
Common mistakes.
- A. A Route 53 failover routing policy with health checks would direct DNS traffic away from a failing endpoint, but it does not allow for serving a custom error page from within the same application flow for specific HTTP error codes like 503 before the DNS record updates.
- B. Creating a second CloudFront distribution and S3 static website to host the custom error page introduces significantly more operational overhead and complexity than using an origin group within an existing distribution.
- D. A CloudFront function can intercept and modify requests/responses, but it's not designed to handle origin failover to serve a static error page for specific HTTP error codes in a high-performance, low-latency manner as effectively as an origin group.
Concept tested. CloudFront origin groups for error handling and failover
Community Discussion
No community discussion yet for this question.