Courseiva
Cloud Technology and ServicesmediumMultiple ChoiceObjective-mapped

CLF-C02 Cloud Technology and Services Practice Question

A media company runs a video-on-demand platform on AWS. Video files (.mp4) and thumbnail images (.jpg) are stored in the same Amazon S3 bucket. The company uses Amazon CloudFront to deliver content to users globally. The video files are large and do not change frequently, so the company wants them to be cached at CloudFront edge locations for 30 days. Thumbnails change more often when new uploads are processed, so the company wants them to be cached for only 1 day. The company wants a single CloudFront distribution to serve both types of content from the same S3 bucket. Which configuration should the company use to meet these requirements with minimal operational overhead?

⚠ Common exam trap

A common mix-up: candidates think Lambda@Edge or multiple distributions are necessary to apply different TTLs to different file types from the same origin, but CloudFront’s multiple behaviors with path patterns and cache policies provide a simpler, native 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

Create two CloudFront behaviors: one for the path pattern /videos/* and one for /thumbnails/*. Associate a cache policy with a TTL of 30 days to the video behavior and a cache policy with a TTL of 1 day to the thumbnail behavior. Both behaviors point to the same S3 origin.

CloudFront allows multiple behaviors within a single distribution, each with its own path pattern and cache policy. By configuring path patterns /videos/* and /thumbnails/*, the company can apply a 30-day TTL cache policy to video requests and a 1-day TTL cache policy to thumbnail requests, both pointing to the same S3 origin. This meets the caching requirements with minimal operational overhead, as it avoids custom code or multiple distributions.

Answer analysis

Option-by-option breakdown

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

  • Create one CloudFront behavior for all content. Set a cache policy with a TTL of 30 days. Create a Lambda@Edge function to override the TTL to 1 day for requests with .jpg extension.

    Why it's wrong here

    This adds unnecessary complexity and operational overhead by introducing Lambda@Edge when CloudFront natively supports different TTLs per behavior. Moreover, the cache policy applies at the behavior level, not per file extension within a single behavior, making this solution error-prone and harder to maintain.

    When this WOULD be correct

    If the requirement was to dynamically adjust TTL based on request properties (e.g., user agent, device type) or to implement custom logic (e.g., conditional caching based on custom headers), then using Lambda@Edge to override TTL would be appropriate.

  • Create two CloudFront behaviors: one for the path pattern /videos/* and one for /thumbnails/*. Associate a cache policy with a TTL of 30 days to the video behavior and a cache policy with a TTL of 1 day to the thumbnail behavior. Both behaviors point to the same S3 origin.

    Why this is correct

    This uses CloudFront's built-in behavior routing with path patterns. Each behavior can have its own cache policy (or TTL settings), allowing different caching durations for videos and thumbnails while using a single distribution and a single S3 bucket. This meets the requirements with minimal operational overhead.

  • Create two separate CloudFront distributions: one for videos with a cache policy of 30 days, and one for thumbnails with a cache policy of 1 day. Point both to the same S3 bucket.

    Why it's wrong here

    Managing two separate distributions adds complexity and unnecessary costs. A single distribution with multiple behaviors is designed for exactly this use case. Using two distributions would require managing separate DNS records, SSL certificates, and other configuration.

    When this WOULD be correct

    If the requirement were to use different SSL certificates, custom domain names, or security policies for videos and thumbnails, or if the content types needed to be served from different origins with distinct configurations, then separate distributions would be appropriate.

  • In the S3 bucket, create two folders: /videos and /thumbnails. Use S3 Cross-Region Replication to replicate thumbnails to a separate bucket in a different Region. Create a single CloudFront behavior with a cache policy of 1 day for the thumbnail bucket and a separate behavior for the original bucket.

    Why it's wrong here

    Cross-Region Replication is not needed for caching TTL control. This option introduces unnecessary data transfer costs and operational complexity. CloudFront can serve content from a single S3 bucket with different cache policies per behavior, making replication and multiple origins unnecessary.

    When this WOULD be correct

    This option would be correct if the question required thumbnails to be stored in a different AWS Region for disaster recovery or compliance reasons, and the company needed separate cache behaviors for each bucket with different TTLs.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CLF-C02 exam frequently reuses these exact scenarios with slightly different constraints.

Create two CloudFront behaviors: one for the path pattern /videos/* and one for /thumbnails/*. Associate a cache policy with a TTL of 30 days to the video behavior and a cache policy with a TTL of 1 day to the thumbnail behavior. Both behaviors point to the same S3 origin.Correct answer

Why this is correct

This uses CloudFront's built-in behavior routing with path patterns. Each behavior can have its own cache policy (or TTL settings), allowing different caching durations for videos and thumbnails while using a single distribution and a single S3 bucket. This meets the requirements with minimal operational overhead.

Create one CloudFront behavior for all content. Set a cache policy with a TTL of 30 days. Create a Lambda@Edge function to override the TTL to 1 day for requests with .jpg extension.Wrong answer — click to see why

Why this is wrong here

Lambda@Edge to override TTL adds unnecessary operational overhead and complexity. CloudFront supports multiple behaviors with different cache policies based on path patterns, which is simpler and more efficient.

★ When this WOULD be the correct answer

If the requirement was to dynamically adjust TTL based on request properties (e.g., user agent, device type) or to implement custom logic (e.g., conditional caching based on custom headers), then using Lambda@Edge to override TTL would be appropriate.

Why candidates choose this

Candidates may think Lambda@Edge is a flexible way to customize caching per file type, but they overlook that CloudFront behaviors with path patterns and cache policies already provide a simpler, built-in solution for this use case.

Create two separate CloudFront distributions: one for videos with a cache policy of 30 days, and one for thumbnails with a cache policy of 1 day. Point both to the same S3 bucket.Wrong answer — click to see why

Why this is wrong here

Creating two separate CloudFront distributions increases operational overhead and complexity, and does not allow serving both content types from a single distribution as required. The question explicitly asks for a single distribution.

★ When this WOULD be the correct answer

If the requirement were to use different SSL certificates, custom domain names, or security policies for videos and thumbnails, or if the content types needed to be served from different origins with distinct configurations, then separate distributions would be appropriate.

Why candidates choose this

Candidates may think separate distributions provide clearer separation of cache settings and avoid potential conflicts, overlooking the requirement for a single distribution and the simplicity of using multiple behaviors.

In the S3 bucket, create two folders: /videos and /thumbnails. Use S3 Cross-Region Replication to replicate thumbnails to a separate bucket in a different Region. Create a single CloudFront behavior with a cache policy of 1 day for the thumbnail bucket and a separate behavior for the original bucket.Wrong answer — click to see why

Why this is wrong here

Option D introduces unnecessary complexity with S3 Cross-Region Replication and separate buckets, which increases operational overhead and cost, while the requirement can be met with a single CloudFront distribution and multiple behaviors using path patterns.

★ When this WOULD be the correct answer

This option would be correct if the question required thumbnails to be stored in a different AWS Region for disaster recovery or compliance reasons, and the company needed separate cache behaviors for each bucket with different TTLs.

Why candidates choose this

Candidates may think that using separate buckets and replication is a robust way to handle different caching needs, overlooking that CloudFront behaviors with path patterns can achieve the same with less complexity.

Analysis generated from the official CLF-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

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

One of 988 original CLF-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CLF-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 CLF-C02 exam.