/aws-dev-toolkit:cloudfrontfrom aws-dev-toolkit
Designs and configures Amazon CloudFront distributions for CDN setup, cache behaviors, origins, Lambda@Edge, CloudFront Functions, signed URLs, WAF integration, and cache debugging.
Ships in aws-dev-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an AWS CloudFront specialist. Design, configure, and troubleshoot CloudFront distributions and edge architectures.
A CloudFront distribution has:
s3:GetObject to the CloudFront service principalX-Origin-Verify: <secret>) and validate it on the ALB to prevent direct accesshttps-only./api/* -> API Gateway originCache behaviors are matched by path pattern in order of precedence (most specific first). The default (*) is always last.
| Policy | Use Case |
|---|---|
| CachingOptimized | Static assets (JS, CSS, images). Ignores query strings and headers. |
| CachingOptimizedForUncompressedObjects | Same but without Gzip/Brotli |
| CachingDisabled | Pass-through to origin. Use for APIs and dynamic content. |
Custom cache policies when you need to cache by specific query strings or headers. Include only what you must — every key dimension reduces cache hit ratio.
| Policy | Use Case |
|---|---|
| AllViewer | Forward all viewer headers to origin |
| AllViewerExceptHostHeader | Forward all except Host (most common for ALB origins) |
| CORS-S3Origin | Forward CORS headers for S3 |
| Feature | CloudFront Functions | Lambda@Edge |
|---|---|---|
| Runtime | JavaScript only | Node.js, Python |
| Execution time | < 1ms | Up to 5s (viewer) / 30s (origin) |
| Memory | 2 MB | 128-10240 MB |
| Network access | No | Yes |
| Request body access | No | Yes |
| Trigger points | Viewer request, viewer response | All 4 trigger points |
| Price | ~1/6 of Lambda@Edge | Higher |
| Deploy region | All edge locations | Regional edge caches |
Use CloudFront Functions for:
Use Lambda@Edge for:
Use when you need to restrict access to content:
Use a key group (not the legacy CloudFront key pair which requires root account). Upload your public key to CloudFront and reference the key group in the cache behavior.
Set expiration times as short as practical. For streaming, 1-2 hours. For downloads, minutes.
# List distributions
aws cloudfront list-distributions --query 'DistributionList.Items[*].{ID:Id,Domain:DomainName,Status:Status,Aliases:Aliases.Items}'
# Get distribution config
aws cloudfront get-distribution-config --id EXXXXX
# Create invalidation
aws cloudfront create-invalidation --distribution-id EXXXXX --paths "/*"
# Create invalidation for specific paths
aws cloudfront create-invalidation --distribution-id EXXXXX --paths "/index.html" "/static/*"
# List invalidations
aws cloudfront list-invalidations --distribution-id EXXXXX
# Get cache statistics
aws cloudfront get-distribution --id EXXXXX --query 'Distribution.{Status:Status,DomainName:DomainName,Origins:DistributionConfig.Origins.Items[*].DomainName}'
# Test a CloudFront Function
aws cloudfront test-function --name my-function --if-match EXXXXX --stage DEVELOPMENT --event-object fileb://test-event.json
# List CloudFront Functions
aws cloudfront list-functions
# Describe a function
aws cloudfront describe-function --name my-function
| Field | Details |
|---|---|
| Distribution type | Web distribution, streaming, or multi-origin |
| Origins | Origin domains, types (S3/ALB/API GW/custom), access control (OAC) |
| Cache behaviors | Path patterns, cache policies, and origin request policies per behavior |
| SSL/TLS | ACM certificate ARN, minimum protocol version, SNI config |
| WAF | WebACL ID, managed rule groups, custom rate-limiting rules |
| Functions (Edge/CF) | CloudFront Functions or Lambda@Edge, trigger points, purpose |
| Headers | Response headers policy (HSTS, CSP, X-Frame-Options) |
| Logging | Standard logging (S3 bucket) or real-time logging (Kinesis) |
s3 — S3 origins, bucket policies, and Origin Access Controlapi-gateway — API Gateway origins, regional endpoints, and cache behavior configlambda — Lambda@Edge functions and CloudFront Function alternativesnetworking — ALB origins, VPC connectivity, and DNS with Route53security-review — WAF rules, signed URLs, and public exposure reviewapp.abc123.js) for cache busting./* invalidates everything. Use path-specific invalidations or, better, versioned filenames.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
35 skills in this plugin
/agentcoreDeep-dive into Amazon Bedrock AgentCore platform design, service selection, deployment, and production operations. This skill should be used when the user asks to "design an AgentCore architecture", "deploy agents on AgentCore", "configure AgentCore Runtime", "set up AgentCore Memory", "use AgentCore Gateway", "configure AgentCore Identity", "set up AgentCore Policy", "plan agent observability", "evaluate agent quality", "move agent PoC to production", or mentions AgentCore, AgentCore Runtime, AgentCore Memory, AgentCore Gateway, AgentCore Identity, AgentCore Policy, AgentCore Evaluations, AgentCore Code Interpreter, AgentCore Browser, A2A protocol, or multi-agent orchestration on AWS./api-gatewayDesign and configure Amazon API Gateway APIs. Use when choosing between REST and HTTP APIs, setting up authorizers, configuring throttling, managing custom domains, implementing WebSocket APIs, or troubleshooting API Gateway issues./aws-architectDesign and review AWS architectures following Well-Architected Framework principles. Use when planning new infrastructure, reviewing existing architectures, evaluating trade-offs between AWS services, or when asked about AWS best practices./aws-compareCompare 2-3 AWS architecture options side-by-side across cost, complexity, performance, security, and operational burden. Use when evaluating trade-offs between approaches or when the user is deciding between options./aws-debugDebug AWS infrastructure issues, deployment failures, and runtime errors. Use when troubleshooting CloudFormation stack failures, Lambda errors, ECS task failures, permission issues, networking problems, or any AWS service misbehavior./aws-diagramGenerate AWS architecture diagrams in Mermaid or ASCII from a description, existing IaC, or conversation context. Use when the user wants to visualize an architecture.npx claudepluginhub aws-samples/sample-claude-code-plugins-for-startups --plugin aws-dev-toolkitOther plugins' skills for the same job