exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 190 discussion

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?

  • A. Set up a Route 53 failover routing policy. Configure a health check to determine the status of the ALB endpoint and to fail over to the failover S3 bucket endpoint.
  • B. Create a second CloudFront distribution and an S3 static website to host the custom error page. Set up a Route 53 failover routing policy. Use an active-passive configuration between the two distributions.
  • C. Create a CloudFront origin group that has two origins. Set the ALB endpoint as the primary origin. For the secondary origin, set an S3 bucket that is configured to host a static website Set up origin failover for the CloudFront distribution. Update the S3 static website to incorporate the custom error page.
  • D. Create a CloudFront function that validates each HTTP response code that the ALB returns. Create an S3 static website in an S3 bucket. Upload the custom error page to the S3 bucket as a failover. Update the function to read the S3 bucket and to serve the error page to the end users.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
pupsik
Highly Voted 1 year, 7 months ago
Selected Answer: C
Origin Groups in CloudFront is what we need here.
upvoted 6 times
...
chris_spencer
Most Recent 3 months, 4 weeks ago
Selected Answer: C
C because of custom error pages https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/creating-custom-error-pages.html
upvoted 1 times
...
Dgix
11 months ago
Selected Answer: D
A and B are plainly wrong and can be eliminated straight away. The choice therefore is between C and D. The question asks for an immediate display of a custom error page - NOT about permanent failover. Therefore, the correct answer is D.
upvoted 4 times
altonh
2 weeks, 1 day ago
D is wrong because of this statement: "Update the function to read the S3 bucket and serve the error page to the end users." CloudFront function cannot do any network access.
upvoted 1 times
...
fartosh
8 months, 1 week ago
According to https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/high_availability_origin_failover.html CloudFront always tries to serve the content from the primary origin first. > CloudFront routes all incoming requests to the primary origin, even when a previous request failed over to the secondary origin. CloudFront only sends requests to the secondary origin after a request to the primary origin fails. Therefore option C is still valid as it does not leave CloudFront in "permanent failover".
upvoted 1 times
...
...
chelbsik
1 year ago
Selected Answer: D
I go for D: it contains all steps to setup the requested solution, and CloudFront function suits here https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-functions.html "URL redirects or rewrites – You can redirect viewers to other pages based on information in the request, or rewrite all requests from one path to another".
upvoted 1 times
...
AimarLeo
1 year ago
Selected Answer: D
'The company wants to display a custom error message page when these errors occur. The page should be displayed immediately for this error code.' The purpose of the question obviously is to return that error page not really a FAILOVER mechanism --> Leaves D as an asnwer
upvoted 3 times
...
carpa_jo
1 year, 1 month ago
For people are asking why C is better than A: The approach of A is more suited for scenarios where there is a complete failure of the primary endpoint rather than intermittent errors. The health checks may not register a failure if the 502 errors are sporadic and the system is generally operational, thus the failover might not be triggered. With the approach of C CloudFront will always automatically switch to the secondary origin when the primary origin returns specific HTTP status code failure responses.
upvoted 3 times
...
Niko13
1 year, 1 month ago
Selected Answer: C
Least Operational Overhead is C
upvoted 2 times
...
career360guru
1 year, 2 months ago
Selected Answer: C
Least Operational Overhead is C
upvoted 2 times
...
KCjoe
1 year, 3 months ago
I know C is good, but why not A, seems to me A is much easier.
upvoted 1 times
SuperDuperPooperScooper
1 year, 2 months ago
Route 53 failover will not be as immediate as C. Cloudfront will immediately seerve up the error page if the request to the primary origin fails, so there is no delay between the primary origin health being degraded and the failover page being served.
upvoted 2 times
...
...
bur4an
1 year, 4 months ago
Repeat question?
upvoted 1 times
...
kjcncjek
1 year, 5 months ago
why not A?
upvoted 3 times
hamimelon
4 months ago
Route 53 fail over to S3? How can Route 53 display the image?
upvoted 1 times
...
...
NikkyDicky
1 year, 7 months ago
Selected Answer: C
it's a C
upvoted 2 times
...
Jackhemo
1 year, 7 months ago
Selected Answer: C
From olabiba.ai: By using a CloudFront origin group with two origins, you can configure failover between the ALB endpoint and the S3 bucket hosting the static website. This ensures that if the ALB returns HTTP 503 Service Unavailable errors, CloudFront will automatically failover to the S3 bucket and serve the custom error page. Setting up origin failover for the CloudFront distribution allows for immediate failover to the secondary origin when the primary origin is unavailable. This minimizes the impact of the ALB errors and provides a seamless experience for users by displaying the custom error page. Updating the S3 static website to incorporate the custom error page ensures that the error page is readily available and can be served to users without any additional processing or delays.
upvoted 4 times
...
rbm2023
1 year, 8 months ago
Almost went for D but this would take too much operational overhead.
upvoted 2 times
rbm2023
1 year, 8 months ago
Option C
upvoted 1 times
...
...
andreitugui
1 year, 8 months ago
Selected Answer: C
Answer is C, you can use origin groups and configure error response pages in Cloud Front based on different request response codes (503, 404, 403 etc)
upvoted 3 times
...
Roontha
1 year, 8 months ago
Answer : C https://repost.aws/knowledge-center/cloudfront-distribution-serve-content
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago