Question

Difficulty: EasyHigh-Performing Content Delivery and Caching Solutions

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?

  1. The cache behavior for the newsletter and stylesheet files has its Minimum TTL, Default TTL, and Maximum TTL set to 0 seconds.Answer
  2. B
    The files are stored in the Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class, which disables edge location caching.
  3. C
    The CloudFront distribution routes traffic through a NAT Gateway that has reached its data transfer capacity limit.
  4. D
    Amazon 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

1
Analyze the symptom of a 0% cache hit ratio and high data transfer/request charges on the Amazon S3 origin.
The symptom indicates that CloudFront is not caching the content at edge locations, prompting it to request the files from S3 on every user request.
Understanding why the CDN cache is bypassed is key to resolving the performance and cost issues.
2
Evaluate the TTL settings of the CloudFront cache behavior configured for the files.
If the Minimum, Default, and Maximum TTL are set to 0 seconds, CloudFront treats the content as expired immediately and fetches a fresh copy from the origin for every incoming request.
TTL settings directly control how long objects remain cached in CloudFront before a revalidation or fetch from the origin is required.

Key Concept

CloudFront TTL Configuration
Rate this question