A static site is hosted in Amazon S3 and delivered by CloudFront. After a frontend release, the same JavaScript bundles are fetched repeatedly from the origin. Logs show that requests include unneeded query strings and cookies, which prevent cache reuse. Which two changes should the team make to reduce origin traffic and cost? Select two.
Trap 1: Increase the size of the S3 bucket.
Bucket size does not improve cache reuse or reduce request costs. The issue is cacheability, not storage capacity.
Trap 2: Place an Application Load Balancer in front of S3.
An ALB is not used as a front end for static S3 content in this pattern. It adds unnecessary infrastructure and does not address the cache key problem.
Trap 3: Disable caching so clients always get the latest files.
Disabling caching guarantees more origin traffic and higher cost. The deployment already uses versioned assets, so cache efficiency should increase rather than disappear.
- A
Configure a CloudFront cache policy that forwards only the query strings, headers, and cookies the app actually needs.
Reducing the cache key to only required values increases cache hit ratio and lowers origin fetches. CloudFront can reuse responses more effectively when unnecessary request data is not forwarded.
- B
Use versioned file names for static assets and set a long TTL for immutable objects.
Versioned filenames let you cache assets aggressively without risking stale content after deployments. Long TTLs reduce repeated origin requests and lower both transfer and request costs.
- C
Increase the size of the S3 bucket.
Why wrong: Bucket size does not improve cache reuse or reduce request costs. The issue is cacheability, not storage capacity.
- D
Place an Application Load Balancer in front of S3.
Why wrong: An ALB is not used as a front end for static S3 content in this pattern. It adds unnecessary infrastructure and does not address the cache key problem.
- E
Disable caching so clients always get the latest files.
Why wrong: Disabling caching guarantees more origin traffic and higher cost. The deployment already uses versioned assets, so cache efficiency should increase rather than disappear.