cloudfront

Configure CloudFront distributions with origins, cache behaviors, and edge functions.

12|5|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/aws-samples/sample-claude-code-plugins-for-startups --skill cloudfront-aws-samples
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudfront
Source: https://github.com/aws-samples/sample-claude-code-plugins-for-startups/tree/main/plugins/aws-dev-toolkit/skills/cloudfront
Command: npx skills add https://github.com/aws-samples/sample-claude-code-plugins-for-startups --skill cloudfront-aws-samples

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CloudFront is a scalable CDN and edge computing platform that optimizes content delivery, secures public endpoints, and accelerates dynamic responses by configuring distributions, cache behaviors, origins, and edge functions.

Core Features & Use Cases

  • Origins and cache behaviors configuration for S3, ALB/NLB, API Gateway, and custom origins
  • Lambda@Edge and CloudFront Functions integration for request/response customization
  • Signed URLs and signed cookies to secure access to content
  • WAF integration and security headers to enforce best practices
  • Troubleshooting and performance tuning for latency, cache misses, and origin errors

Quick Start

Provide a ready-to-deploy CloudFront distribution configuration for a web app, including origins, cache behaviors, Lambda@Edge hooks, and WAF integration.

Frequently Asked Questions about cloudfront

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure CloudFront cache behaviors for different origin types like S3 and ALB?

CloudFront cache behaviors route requests to S3, ALB, or API Gateway origins based on path patterns. You configure origins and cache behaviors to optimize content delivery by specifying TTLs, allowed HTTP methods, and forwarding rules for each origin type.

How do I use Lambda@Edge and CloudFront Functions to customize request and response headers?

Lambda@Edge and CloudFront Functions execute custom code at edge locations to modify HTTP request and response headers. You attach these functions to cache behaviors to inject headers, rewrite URLs, or perform authentication before traffic reaches your origin.

What is the best way to secure CloudFront content delivery using signed URLs and WAF?

Securing CloudFront content delivery involves integrating AWS WAF to filter malicious traffic and using signed URLs or signed cookies to restrict access. WAF enforces security postures at the edge, while signed URLs authorize specific users to access protected content.

Why is my CloudFront distribution returning cache misses and high origin latency?

CloudFront cache misses and high origin latency often stem from misconfigured cache behaviors, improper TTL settings, or forwarded headers that reduce cache efficiency. Troubleshoot by reviewing cache policies and origin response times to tune performance and increase cache hit ratios.

Does CloudFront support API backends and how do I optimize dynamic API responses?

CloudFront supports API backends by routing dynamic requests through API Gateway or ALB origins. You optimize dynamic API responses by configuring cache behaviors to forward all required headers and disable caching for POST requests, ensuring accurate API execution.

Can I deploy a ready-to-use CloudFront configuration for a web application with WAF?

You can deploy a ready-to-use CloudFront configuration for web applications that includes S3 origins, cache behaviors, and WAF integration. This configuration accelerates content delivery and secures public endpoints by applying web ACLs and security headers automatically.