AWS CloudFront CDN

AWS CloudFront CDN

Gives a coding agent a skill for distributing content through AWS CloudFront, covering caching, security headers, WAF, origins, CLI and Terraform setups.

Skill files6 files

references/

scripts/

templates/

SKILL.md98 lines
1
---
2
name: aws-cloudfront-cdn
3
description: >
4
Distribute content globally using CloudFront with caching, security headers,
5
WAF integration, and origin configuration. Use for low-latency content
6
delivery.
7
---
8
9
# AWS CloudFront CDN
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
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.
22
23
## When to Use
24
25
- Static website hosting and assets
26
- API acceleration and dynamic content
27
- Video and media streaming
28
- Mobile application content
29
- Large file downloads
30
- Real-time data distribution
31
- DDoS protection for origins
32
- Origin isolation and security
33
34
## Quick Start
35
36
Minimal working example:
37
38
```bash
39
# Create distribution for S3 origin
40
aws cloudfront create-distribution \
41
--distribution-config '{
42
"CallerReference": "myapp-'$(date +%s)'",
43
"Enabled": true,
44
"Comment": "My application distribution",
45
"Origins": {
46
"Quantity": 1,
47
"Items": [{
48
"Id": "myS3Origin",
49
"DomainName": "mybucket.s3.us-east-1.amazonaws.com",
50
"S3OriginConfig": {
51
"OriginAccessIdentity": "origin-access-identity/cloudfront/ABCDEFG1234567"
52
}
53
}]
54
},
55
"DefaultCacheBehavior": {
56
"AllowedMethods": {
57
"Quantity": 3,
58
"Items": ["GET", "HEAD", "OPTIONS"]
59
},
60
"ViewerProtocolPolicy": "redirect-to-https",
61
"TargetOriginId": "myS3Origin",
62
"ForwardedValues": {
63
"QueryString": false,
64
// ... (see reference guides for full implementation)
65
```
66
67
## Reference Guides
68
69
Detailed implementations in the `references/` directory:
70
71
| Guide | Contents |
72
|---|---|
73
| [CloudFront Distribution with AWS CLI](references/cloudfront-distribution-with-aws-cli.md) | CloudFront Distribution with AWS CLI |
74
| [Terraform CloudFront Configuration](references/terraform-cloudfront-configuration.md) | Terraform CloudFront Configuration |
75
| [Custom Headers and Security Configuration](references/custom-headers-and-security-configuration.md) | Custom Headers and Security Configuration |
76
77
## Best Practices
78
79
### ✅ DO
80
81
- Use Origin Access Identity (OAI) for S3
82
- Enable HTTPS only for viewers
83
- Compress content at CloudFront
84
- Set appropriate cache TTLs
85
- Use cache invalidation cautiously
86
- Enable WAF for protection
87
- Monitor CloudWatch metrics
88
- Use multiple origins for redundancy
89
90
### ❌ DON'T
91
92
- Make S3 buckets public
93
- Cache sensitive data
94
- Use HTTP for production
95
- Ignore cache headers
96
- Create excessive invalidations
97
- Skip WAF protection
98

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…