After an application update, your ALB intermittently returns 502 (Bad Gateway) errors caused by malformed HTTP headers. Reloading the page immediately usually succeeds. You want to present a custom error page to visitors while the root cause is being fixed, with the least operational overhead. Which combination of actions should you take? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Create an S3 bucket configured for static website hosting and upload your custom error page(s) to that bucket., Configure a CloudFront distribution with a custom error response that serves your custom error page, and update DNS to route users to the CloudFront distribution or the publicly accessible page..
Why this is the answer
The correct options provide a robust and low-overhead solution. Creating an S3 bucket for static website hosting is the simplest way to host a custom error page. Configuring a CloudFront distribution with a custom error response then allows CloudFront to intercept the 502 errors from the ALB and serve the S3-hosted custom error page to users. This avoids exposing the ALB's errors directly and provides a consistent user experience. Updating DNS to point to CloudFront ensures all traffic goes through this error handling mechanism. The incorrect options introduce unnecessary complexity or do not directly address the problem. Using CloudWatch alarms and Lambda to dynamically change ALB forwarding rules (options B and D) is overly complex for serving a static error page and introduces potential latency and operational overhead. Route 53 health checks (option C) are for DNS-level failover and wouldn't directly intercept HTTP 502 errors originating from the ALB before they reach the user, nor would they provide a seamless custom error page experience for these specific errors.
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