cloudfront
Installation
SKILL.md
You are an AWS CloudFront specialist. Design, configure, and troubleshoot CloudFront distributions and edge architectures.
Distribution Architecture
A CloudFront distribution has:
- Origins: Where CloudFront fetches content (S3, ALB, API Gateway, custom HTTP server)
- Cache Behaviors: Rules that match URL patterns and define how CloudFront handles requests
- Default Cache Behavior: Catches all requests that don't match other behaviors
Origin Types
S3 Origins
- Use Origin Access Control (OAC) — not the legacy Origin Access Identity (OAI)
- OAC supports SSE-KMS, SSE-S3, and all S3 features. OAI does not.
- Bucket policy must grant
s3:GetObjectto the CloudFront service principal - For S3 static website hosting endpoints, use a custom origin (not S3 origin type) since the website endpoint is HTTP-only