Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Aws Cloudfront Cdn

  • 429 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

aws-cloudfront-cdn is a Cloud Infrastructure skill that configures AWS CloudFront distributions, origins, TLS, cache behaviors, and invalidation rules for developers who need to accelerate static assets and API edge deli

About

aws-cloudfront-cdn is a useful-ai-prompts skill that guides developers through AWS CloudFront CDN setup for production web and API workloads. The skill covers distribution creation, origin configuration for S3 or custom backends, TLS certificate attachment, cache behavior tuning, and cache invalidation workflows so static assets and API responses reach users faster at the edge. Developers reach for aws-cloudfront-cdn when a SaaS or API app is ready to leave single-region hosting and needs global edge caching with controlled cache keys and HTTPS termination. The skill focuses on AWS-native CDN patterns rather than generic caching theory.

  • Defines CloudFront origins and behaviors
  • Sets cache TTL and invalidation strategy
  • Configures TLS, OAI, and WAF hooks
  • Optimizes static and API edge paths

Aws Cloudfront Cdn by the numbers

  • 429 all-time installs (skills.sh)
  • Ranked #380 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill aws-cloudfront-cdn

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs429
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you configure AWS CloudFront for static assets?

Configure CloudFront distributions, origins, TLS, cache behaviors, and invalidation rules to accelerate static assets and API edge delivery on AWS.

Who is it for?

Backend and full-stack developers shipping AWS-hosted SaaS or APIs who need production CloudFront CDN configuration with cache and TLS control.

Skip if: Developers on non-AWS clouds, local-only dev environments, or apps with no static assets or edge caching requirements.

When should I use this skill?

A developer needs to set up or tune AWS CloudFront for static files, SPA hosting, or API edge acceleration with invalidation.

What you get

CloudFront distribution config, cache behavior rules, TLS setup, and invalidation workflow

  • CloudFront distribution configuration
  • Cache behavior definitions

Files

SKILL.mdMarkdownGitHub ↗

AWS CloudFront CDN

Table of Contents

Overview

Amazon CloudFront is a fast, globally distributed content delivery network (CDN). Cache content at edge locations worldwide to reduce latency, improve performance, and provide high availability with DDoS protection.

When to Use

  • Static website hosting and assets
  • API acceleration and dynamic content
  • Video and media streaming
  • Mobile application content
  • Large file downloads
  • Real-time data distribution
  • DDoS protection for origins
  • Origin isolation and security

Quick Start

Minimal working example:

# Create distribution for S3 origin
aws cloudfront create-distribution \
  --distribution-config '{
    "CallerReference": "myapp-'$(date +%s)'",
    "Enabled": true,
    "Comment": "My application distribution",
    "Origins": {
      "Quantity": 1,
      "Items": [{
        "Id": "myS3Origin",
        "DomainName": "mybucket.s3.us-east-1.amazonaws.com",
        "S3OriginConfig": {
          "OriginAccessIdentity": "origin-access-identity/cloudfront/ABCDEFG1234567"
        }
      }]
    },
    "DefaultCacheBehavior": {
      "AllowedMethods": {
        "Quantity": 3,
        "Items": ["GET", "HEAD", "OPTIONS"]
      },
      "ViewerProtocolPolicy": "redirect-to-https",
      "TargetOriginId": "myS3Origin",
      "ForwardedValues": {
        "QueryString": false,
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
CloudFront Distribution with AWS CLICloudFront Distribution with AWS CLI
Terraform CloudFront ConfigurationTerraform CloudFront Configuration
Custom Headers and Security ConfigurationCustom Headers and Security Configuration

Best Practices

✅ DO

  • Use Origin Access Identity (OAI) for S3
  • Enable HTTPS only for viewers
  • Compress content at CloudFront
  • Set appropriate cache TTLs
  • Use cache invalidation cautiously
  • Enable WAF for protection
  • Monitor CloudWatch metrics
  • Use multiple origins for redundancy

❌ DON'T

  • Make S3 buckets public
  • Cache sensitive data
  • Use HTTP for production
  • Ignore cache headers
  • Create excessive invalidations
  • Skip WAF protection

Related skills

FAQ

What does aws-cloudfront-cdn help configure?

aws-cloudfront-cdn guides CloudFront distribution setup including origins, TLS, cache behaviors, and invalidation rules. The skill targets static asset acceleration and API edge delivery on AWS.

When should developers use aws-cloudfront-cdn?

aws-cloudfront-cdn fits when a production AWS app needs global CDN caching, HTTPS at the edge, and controlled invalidation after deploys rather than serving assets from a single region.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.