ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 709 - SAA-C03 discussion

Report
Export

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? (Select TWO.)

A.
Set the CloudFront default TTL to 2 minutes.
Answers
A.
Set the CloudFront default TTL to 2 minutes.
B.
Set a default TTL of 2 minutes on the S3 bucket
Answers
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.
Answers
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.
Answers
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
Answers
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
Suggested answer: A, E

Explanation:

Understanding the Requirement: The company wants to improve caching to enhance website performance while ensuring that stale content is not served for more than a few minutes after a deployment.

Analysis of Options:

Set CloudFront TTL: Setting a short TTL (e.g., 2 minutes) ensures that cached content is refreshed frequently, reducing the risk of serving stale content.

S3 Bucket TTL: This would not control the cache duration for the CloudFront distribution.

Cache-Control Private: This directive is for controlling caching by private caches (e.g., browsers) and is not applicable for CloudFront.

Lambda@Edge: While this can add headers dynamically, it adds complexity and operational overhead.

Cache-Control max-age and CloudFront Invalidation: Setting a longer max-age for objects ensures they are cached longer, reducing load on the origin. Invalidation ensures that updated content is refreshed immediately after deployment.

Best Combination of Caching Methods:

Set the CloudFront default TTL to 2 minutes: This balances caching and freshness of content.

Add a Cache-Control max-age directive of 24 hours and use CloudFront invalidation: This ensures efficient caching while providing a mechanism to clear outdated content immediately after a deployment.

Amazon CloudFront Caching

Invalidating Files in CloudFront

asked 16/09/2024
Francisli Lilles
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first