Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AWS Certified Solutions Architect - Associate SAA-C03 topic 1 question 881 discussion

A company is hosting a high-traffic static website on Amazon S3 with an Amazon CloudFront distribution that has a default TTL of 0 seconds. The company wants to implement caching to improve performance for the website. However, the company also wants to ensure that stale content is not served for more than a few minutes after a deployment.

Which combination of caching methods should a solutions architect implement to meet these requirements? (Choose two.)

  • A. Set the CloudFront default TTL to 2 minutes.
  • B. Set a default TTL of 2 minutes on the S3 bucket.
  • C. Add a Cache-Control private directive to the objects in Amazon S3.
  • D. Create an AWS Lambda@Edge function to add an Expires header to HTTP responses. Configure the function to run on viewer response.
  • E. Add a Cache-Control max-age directive of 24 hours to the objects in Amazon S3. On deployment, create a CloudFront invalidation to clear any changed files from edge caches.
Show Suggested Answer Hide Answer
Suggested Answer: AE 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
EdricHoang
7 hours, 25 minutes ago
Selected Answer: AC
If the content still keep client's cache in 24h, its wrong (answer E)
upvoted 1 times
...
ug56c
3 weeks, 4 days ago
Selected Answer: AE
If your minimum TTL is greater than 0, CloudFront uses the cache policy’s minimum TTL, even if the Cache-Control: no-cache, no-store, and/or private directives are present in the origin headers. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html
upvoted 2 times
...
Nm55569
1 month ago
Selected Answer: AE
"However, the company also wants to ensure that stale content is not served for more than a few minutes after a deployment." After a deployment
upvoted 1 times
...
Scheldon
1 month, 1 week ago
Selected Answer: AC
Answer (AC) Per table on URL https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html#expiration-individual-objects answer E is incorrect because if we will change cache-control max-age to 24h it will means that customer browser will cache web for 24h and customer want to be sure that it will be not longer then few min. Expires header (answer D) from my understanding can be used only on full folder of web not as lambda function which will reply to customer reqeusts. We are setting Default TTL for CloudFront (answer A) not on S3 (answer B) and it will say CloudFront to cache web for 2min.
upvoted 2 times
Scheldon
1 month, 1 week ago
Adding Cache-control private (answerC) will work per customer wish but only if we will add them to the objects which are changed very often or if we will set minimum TTL. In the 1 situation User Browser will not store files which we designate to be often changed and mentioned files will be downloaded every time from origin. In the 2 situation, Cloud front will cache web files for min TTL time but customer browser will not store them. Taking all that in to account I would go with AC
upvoted 2 times
...
...
Linuslin
1 month, 2 weeks ago
Selected Answer: AE
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html#expiration-individual-objects https://stackoverflow.com/questions/43343759/confused-with-minimum-maximum-and-default-ttl-in-cloudfront
upvoted 1 times
...
02ffe1c
2 months ago
Selected Answer: DE
Since it don’t want to cache more than a minute, A cannot be an answer
upvoted 1 times
...
kelmryan1
2 months ago
Answer is AE , C would only be on the user browser and would not cache to the cloud front and would be useless
upvoted 1 times
...
BBR01
2 months ago
Selected Answer: AE
AE. By default, each file automatically expires after 24 hours, but you can change the default behavior in two ways: 1. To change the cache duration for all files that match the same path pattern, you can change the CloudFront settings for Minimum TTL, Maximum TTL, and Default TTL for a cache behavior. 2. To change the cache duration for an individual file, you can configure your origin to add a Cache-Control header with the max-age or s-maxage directive, or an Expires header to the file. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html#expiration-individual-objects
upvoted 3 times
...
xBUGx
3 months ago
Selected Answer: AC
Add a Cache-Control Private Directive to Objects in Amazon S3 (Option C): By setting the Cache-Control header to private for objects in the S3 bucket, you control caching behavior. The private directive indicates that the content is intended for a single user and should not be cached by intermediate proxies or CDNs. This helps prevent stale content from being served to multiple users. Additionally, consider using other Cache-Control directives (e.g., max-age, no-cache, no-store) as needed.
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 ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in