A retailer runs its e-commerce app on EC2 instances behind an Application Load Balancer (ALB) with an Amazon RDS backend. CloudFront is configured with the ALB as the origin to cache static content. Route 53 hosts public DNS. After an app update, the ALB sometimes returns HTTP 502 (Bad Gateway) due to malformed HTTP headers returned to the ALB. Reloading the page immediately usually succeeds. While the company fixes the root cause, the solutions architect needs to show a custom error page instead of the ALB default with minimal operational overhead. Which combination of steps achieves this? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Create an Amazon S3 bucket configured for static website hosting. Upload the custom error page(s) to the S3 bucket., Configure CloudFront custom error responses and specify a custom error page. Update DNS records to point to the CloudFront distribution's publicly accessible web page..
Why this is the answer
The problem describes an ALB returning 502 errors due to malformed HTTP headers, and the goal is to show a custom error page with minimal operational overhead. Creating an Amazon S3 bucket configured for static website hosting and uploading the custom error page(s) to it provides a highly available and cost-effective location to store the custom error page. Configuring CloudFront custom error responses and specifying the custom error page (hosted in S3) allows CloudFront to intercept the 502 errors from the ALB and serve the custom error page instead of passing the ALB's default 502 response to the user. This leverages existing CloudFront infrastructure and requires minimal changes to the application or ALB. The other options are incorrect because: CloudWatch alarms and Lambda functions to modify ALB rules or DNS records introduce significant operational overhead and complexity, which the question explicitly seeks to minimize. Route 53 health checks and fallback targets are typically used for broader service unavailability, not for specific HTTP error codes from an origin that is otherwise healthy. CloudFront's error handling is more direct for this scenario.
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