A digital marketing agency serves promotional HTML newsletters and CSS stylesheets to subscribers globally. The files are hosted in an Amazon S3 bucket behind an Amazon CloudFront distribution. A solutions architect reviews the CloudFront reports and finds that the cache hit ratio is 0%, leading to high latency for users and unexpected S3 data transfer charges. Which configuration issue is the primary cause of this behavior?
- The cache behavior for the newsletter and stylesheet files has its Minimum TTL, Default TTL, and Maximum TTL set to 0 seconds.Answer
- BThe files are stored in the Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class, which disables edge location caching.
- CThe CloudFront distribution routes traffic through a NAT Gateway that has reached its data transfer capacity limit.
- DAmazon Route 53 latency-based routing is configured incorrectly, forcing requests to bypass CloudFront and resolve directly to S3.
Answer
The cache behavior for the newsletter and stylesheet files has its Minimum TTL, Default TTL, and Maximum TTL set to 0 seconds.
The correct answer is configuring the Minimum TTL, Default TTL, and Maximum TTL to 0 seconds. When these parameters are set to 0, CloudFront does not store the files in its edge caches and instead forwards all requests directly to the Amazon S3 origin, resulting in a cache hit ratio of 0% and elevated latency.
Step-by-Step Solution
Key Concept
CloudFront TTL Configuration