Courseiva

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company is using Amazon CloudFront to serve content from an S3 origin. The content is updated infrequently. Users in some regions report seeing stale content. The company wants to ensure that users always see the latest version without waiting for TTL expiration. What is the MOST cost-effective solution?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use file versioning in the URL (e.g., appending a query string or using a unique object key).

File versioning (changing the URL or appending a query string) is the most cost-effective solution because it guarantees that users always fetch the latest version from the origin without waiting for TTL expiration. This approach avoids the costs associated with CloudFront invalidations (Option D) and does not increase load on the origin as a very short TTL would (Option B). Option C (origin shield) helps reduce requests to the origin but does not force existing cached content to be refreshed. Therefore, file versioning is the best practice for infrequently updated content.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Use file versioning in the URL (e.g., appending a query string or using a unique object key).

    Why this is correct

    Appending a version identifier to the URL creates a distinct cache key, so CloudFront fetches the new object immediately rather than serving the stale cached copy until TTL expiry. This satisfies the freshness requirement at minimal cost, avoiding invalidation charges.

  • ✗

    Set a very short TTL (e.g., 0 seconds) for the CloudFront distribution.

    Why it's wrong here

    A zero-second TTL forces CloudFront to forward every request to the origin, eliminating caching benefits and increasing origin load and cost. It is tempting as a way to guarantee freshness, but invalidation requests or versioned object keys target only changed content, which is the cost-effective mechanism when updates are infrequent.

  • ✗

    Use an origin shield to reduce the number of requests to S3.

    Why it's wrong here

    Origin shield adds a caching layer between CloudFront edge locations and S3, reducing origin fetches but not the TTL, so edge locations still serve stale objects until expiry. It is correct when you want to cut origin load, not freshness.

  • ✗

    Create a CloudFront invalidation request for the changed files after each update.

    Why it's wrong here

    Invalidations purge cached objects at every edge location, but AWS charges per invalidation path beyond the free monthly allowance, so frequent updates incur ongoing cost. Invalidations suit occasional urgent removals rather than routine content refreshes.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This SAP-C02 question is part of Courseiva's 984-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on SAP-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is using Amazon CloudFront with an S3 origin. They notice that users are receiving outdated content. What configuration change should be made to ensure users always get the latest content?

medium
  • A.Use signed URLs to serve content.
  • ✓ B.Create an invalidation for the objects.
  • C.Enable compression on the S3 bucket.
  • D.Reduce the TTL to 0 in the CloudFront distribution.

Why B: CloudFront caches objects at edge locations based on the origin's cache headers and the distribution's TTL settings. When content at the S3 origin is updated but the cached object has not yet expired, users continue to receive the stale version. Creating an invalidation explicitly removes the specified objects from all edge caches, forcing CloudFront to fetch the fresh version from S3 on the next request. This is the standard, immediate remediation for serving outdated content.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.