SAP-C02 Exam QuestionsBrowse all questions from this exam

SAP-C02 Exam - Question 10


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 instead of the standard ALB error page with the least operational overhead, two steps are necessary. First, create an Amazon S3 bucket to host a static webpage and upload the custom error pages to that S3 bucket. This allows for a highly-available location to store the error pages. Second, configure a CloudFront custom error page to handle the custom error responses effectively. This setup leverages existing services with minimal additional configuration, offering an efficient and scalable solution without the need for complex DNS changes or handling custom code for each error.

Discussion

17 comments
Sign in to comment
Raj40
Dec 12, 2022

A & E https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GeneratingCustomErrorResponses.html#custom-error-pages-procedure

atiradoOptions: AE
Dec 19, 2023

Option A - This option helps: Allows exposing custom error pages from a highly-available location Option B - This option requires a lot of set up Option C - This option might not work because modifying DNS will redirect all traffic publicly accessible webpage Option D - This option requires a lot of set up Option E - This option helps: Shows a custom error page when the error occurs

SarutobiOptions: AE
Apr 15, 2023

We need a combination, so A provides the error page; should we go with DNS health-check (C+A) or CloudFront (E+A)? In my case, I try to stick to a single service to do failover, and DNS is a great option, but it looks like, in this question, CloudFront is already present with the least-operational overhead.

kz407Options: AE
Mar 15, 2024

The only problem with E is that it say "Modify DNS records to point to a publicly accessible web page" at the end. It doesn't make sense to begin with. And configuring custom error responses in CF has nothing to do with DNS anyway.

cattle_reiOptions: AE
Jul 19, 2023

AE because it accomplishes the task and is the least complex.

bur4anOptions: AE
Aug 30, 2023

Agree with Raj40

rtguru
May 23, 2023

Correct answer is A&E

Parimal1983Options: AE
Jun 24, 2023

Custom error pages need to setup in different location then source (where web pages is hosted), configure CloudFront to use those custom error pages

NikkyDickyOptions: AE
Jun 27, 2023

AE is right

dimitry_khan_arcOptions: CE
Aug 27, 2023

C & E. B & D are incorrect. Managing lambda is overhead. A is incorrect. Static page from S3 need to retrieve with custom code.

jainparag1
Nov 23, 2023

Do you have any further reference to your explanation of custom code requirement to fetch the error page from S3?

_Jassybanga_
Feb 6, 2024

not really , you just need to static url provided by aws when you use the bucket for static webpage and embed it anywhere to reach to the static website

severlightOptions: AE
Nov 11, 2023

I haven't found out why should we use C.

abeb
Nov 26, 2023

should be AE

azhar3128
Jun 5, 2024

I think it is wordplay. Option A says to upload "error pages", which will be an overhead for creating a page for each error and unnecessary. that's where C & E are correct

MoT0ne
Mar 12, 2024

I think why is not A is because of this sentence - "The webpage returns successfully when a solutions architect reloads the webpage immediately after the error occurs." - so let's not think it as requiring a maintenance page

iulian0585Options: AE
May 26, 2024

A and E according to AWS documentation: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GeneratingCustomErrorResponses.html#custom-error-pages-procedur

roger8t8
Jun 13, 2024

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

agatimOptions: AC
Jul 3, 2024

Option A - Allow us to expose a error page with low effort. Option B - Requires a lot of set up Option C - Allow us to redirect all the traffic to our error page exposed by S3 in case of errors. Option D - requires a lot of set up Option E - Custom Error Pages in CloudFront refers to the same Origin (in our case the Load Balancer) so it does not work with all the other answers. So correct answer are A and C