AWS Certified Solutions Architect - Professional Exam QuestionsBrowse all questions from this exam

AWS Certified Solutions Architect - Professional Exam - Question 831


A retail company is operating its ecommerce application on AWS. The application runs on Amazon EC2 instances behind an Application Load Balancer (ALB).

The company uses an Amazon RDS DB instance as the database backend. Amazon CloudFront is configured with one origin that points to the ALB. Static content is cached. Amazon Route 53 is used to host all public zones.

After an update of the application, the ALB occasionally returns a 502 status code (Bad Gateway) error. The root cause is malformed HTTP headers that are returned to the ALB. The webpage returns successfully when a solutions architect reloads the webpage immediately after the error occurs.

While the company is working on the problem, the solutions architect needs to provide a custom error page instead of the standard ALB error page to visitors.

Which combination of steps will meet this requirement with the LEAST amount of operational overhead? (Choose two.)

Show Answer
Correct Answer: AE

To provide a custom error page with minimal operational overhead, the best approach involves using Amazon S3 to host static web pages and configuring CloudFront for custom error responses. First, create an Amazon S3 bucket and upload the custom error pages. This allows CloudFront to serve these error pages when necessary. Second, configure a CloudFront custom error page to handle the 502 status code and point to the S3 hosted error page. This solution utilizes existing AWS services efficiently, ensures the custom error page is always available irrespective of the application state, and does not require complex monitoring or DNS changes.

Discussion

12 comments
Sign in to comment
JonfernzOptions: AE
Nov 1, 2022

"Save your custom error pages in a location that is accessible to CloudFront. We recommend that you store them in an Amazon S3 bucket, and that you don’t store them in the same place as the rest of your website or application’s content. If you store the custom error pages on the same origin as your website or application, and the origin starts to return 5xx errors, CloudFront can’t get the custom error pages because the origin server is unavailable." https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GeneratingCustomErrorResponses.html

shailurtm2001
Apr 22, 2022

It's AE https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GeneratingCustomErrorResponses.html

titleone
May 11, 2022

AE C, there is not InternalError type error but InternalFailure. E, CloudFront provides the error page features exactly

Bigbearcn
Apr 24, 2022

AE. Custom error page for CF.

user0001
May 9, 2022

A/C , you need it only on failure, E does not provide this option

hfeng95
May 16, 2022

Read the problem, you will see that they would like to have a customized error page while troubleshooting. A&E is correct in my opinion

[Removed]
May 16, 2022

I think DE As in D you need a health-check and lambda mechanism to handle the incident https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GeneratingCustomErrorResponses.html

rockcOptions: AE
Jun 23, 2022

https://aws.amazon.com/blogs/aws/custom-error-pages-and-responses-for-amazon-cloudfront/

gnicOptions: AE
Aug 31, 2022

AE no brain

JohnPiOptions: AB
Oct 11, 2022

AB ALB 502 means FailedHealthChecks DNS has a TTL and relies on the client's good behavior.

JohnPi
Oct 11, 2022

furthermore, "The webpage returns successfully when a solutions architect reloads the webpage immediately after the error occurs"

Naj_64
Oct 17, 2022

Not true. HTTP 502: Bad gateway -- https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-troubleshooting.html#http-502-issues

JohnPi
Oct 21, 2022

https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/

JohnPi
Oct 21, 2022

https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/

JohnPi
Oct 26, 2022

AE is the answer

zWarez
Feb 10, 2023

AE. CloudWatch cannot be used here since it's not repoint to error page in time.

AnonymousOptions: AC
Jul 28, 2023

Appears logical to me

Chungies
Aug 4, 2024

A and C are the ones i will pick