How Do You Cache S3 Video Files at CloudFront Edge Locations?

Answer Correct answer: B — Configure a CloudFront cache behavior matching the video URL path pattern to route requests to the new Amazon S3 origin for edge caching.

A company has created a new video-on-demand (VOD) application. The application runs on a fleet of Amazon EC2 instances behind an Application Load Balancer (ALB). The company configured an Amazon CloudFront distribution and set the ALB as the origin. Because of increasing application demand, the company wants to move all video files to a central Amazon S3 bucket. A CloudOps engineer needs to ensure that video files can be cached at edge locations after the company migrates the files to Amazon S3. Which solution will meet this requirement?

  1. Configure CloudFront to send the X-Forwarded-For header to the origin and to redirect video requests to Amazon S3 instead of the ALB.
  2. Configure a new CloudFront cache behavior to route to Amazon S3 as a new origin, based on matching an URL path pattern. Correct Answer
  3. Configure URL signing in the CloudFront distribution by using a custom policy. Ensure that video files are accessed through signed URLs only.
  4. Configure a CloudFront origin group. Specify the required HTTP status codes to direct connection attempts to a secondary origin.

Community Insight

The exam tests whether you know CloudFront cache behaviors—not headers, signed URLs, or origin groups—select the origin and cache settings for a given URL path; the trap is confusing access control or failover features with content routing.

Moving video files to Amazon S3 while keeping CloudFront caching requires adding S3 as an origin and creating a cache behavior that matches the video URL path pattern. This page confirms option B and explains why header forwarding, signed URLs, and origin groups do not provide path-based origin routing.

A common mistake is choosing an origin group (D) because it mentions a secondary origin, but origin groups only provide failover based on HTTP status codes; they do not route video path patterns to S3 for edge caching.

Community Discussion (1 comments)

Bad_Mat 👍 1 Selected: B
The correct solution is B. Configure a new CloudFront cache behavior to route to Amazon S3 as a new origin, based on matching an URL path pattern. Adding Amazon S3 as a distinct origin alongside the Application Load Balancer (ALB) and defining a specific cache behavior path pattern ensures video requests pull and cache directly from S3.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

CloudFront decides both the origin and the cache settings for each request through cache behaviors, and each behavior is tied to a URL path pattern. By adding the S3 bucket as a new origin and creating a cache behavior whose path pattern matches the video files, the distribution sends video requests directly to S3 while leaving ALB-backed requests on their existing behavior. That design is exactly what lets the video files be cached at edge locations after migration, because the objects are now fetched through a CloudFront cache behavior rather than through the ALB. Option B therefore satisfies the requirement with the native CloudFront routing and caching mechanism.

Why the Other Options Are Wrong

Option A focuses on forwarding the X-Forwarded-For header and redirecting requests, but header forwarding does not create a cache behavior for S3 and a redirect is not the same as associating S3 as a cacheable origin. Option C uses signed URLs and a custom policy, which control who may access content rather than how CloudFront routes and caches it from S3; signing alone does not add the video path to an S3 origin. Option D configures an origin group, but origin groups are failover constructs that use HTTP status codes to switch to a secondary origin, not a path-pattern routing mechanism for normal video caching. None of these alternatives establishes the necessary S3 origin plus cache behavior for the video URL path.

Community Comment Notes

As Bad_Mat noted, the correct approach is to route to Amazon S3 as a new origin and match a URL path pattern for the video files. The explanation emphasizes adding S3 as a distinct origin alongside the ALB and defining a specific cache behavior path pattern so video requests pull and cache directly from S3. No commenter argued for the header-forwarding, signed-URL, or origin-group options, and the community reasoning aligns with the CloudFront cache behavior model.

Official Reference

Exam Strategy

When a CloudFront question asks about serving or caching content from a new source, separate routing and caching features from access control and failover features. Look for a cache behavior with a URL path pattern and an origin, and reserve signed URLs for authorization and origin groups for failover scenarios.

Frequently Asked Questions

Why isn't a CloudFront origin group the right choice for moving videos to S3?

Origin groups only fail over between primary and secondary origins based on HTTP status codes; they do not create path-based routing or cache settings for video requests.

Does URL signing help cache video files at CloudFront edge locations?

No. Signed URLs and custom policies control who can access content; caching is determined by the cache behavior's path pattern, origin, and TTL settings.

More SOA-C03 FAQ →

Related Analysis

Practice All SOA-C03 Questions

Access 100 questions with complete answers and detailed explanations.

View Full SOA-C03 Practice Test →

← Back to SOA-C03 Study Guide