Amazon CloudFront
When to Use
- Design, create, or tune a CloudFront distribution, cache policy, or pricing model.
- Configure CloudFront certificates, alternate domain names, origins, or origin access controls.
- Restrict viewer access or investigate standard and real-time CloudFront logs.
- Route custom-domain DNS changes to
routing-traffic-with-route53-and-cloudfront.
Do not use this skill for pure Route 53 DNS administration. Use
route53. Do not use it for the Route 53 alias-record portion of a CloudFront
custom domain; use the cross-service skill linked above.
Prerequisites and Quick Reference
- Confirm the AWS account, region context, distribution ID, origins, hostnames, and change window.
- Prefer read-only discovery before proposing mutations; never print credentials or certificate keys.
- CloudFront and its ACM certificate region use
us-east-1; verify this before certificate work.
- Read the matching reference in the task table, execute its checks, and retain command output for
verification.
Overview
Domain expertise for configuring Amazon CloudFront content delivery: deciding when to use
CloudFront and how it fits the wider architecture, managing custom-domain certificates and
multi-tenant distributions, protecting origins, securing content, and observing traffic.
This skill is a router. Each customer task maps to a procedure file under references/. Read the
matching reference in full before acting, then follow its constraints and steps. The reference
files are self-contained: each carries its own decision tables, constraints, procedure, and
troubleshooting.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. CloudFront is a global service; its API calls
and the AWS Certificate Manager (ACM) certificates it uses are made in us-east-1 regardless of
where the customer's application runs.
Which CloudFront task do you need?
| Goal |
Reference |
| Decide whether CloudFront is the right layer, see how it integrates, create a distribution, tune caching, or choose pricing |
when to use CloudFront |
| Serve a custom domain over HTTPS, manage ACM certificates, or run many domains with a certificate per tenant |
managing certificates with CloudFront |
| Make CloudFront the only way to reach the origin (S3 OAC, VPC origins, origin mutual TLS, security groups) |
protecting your origins |
| Limit who can view content by identity, location, client certificate, or auth token |
securing your content |
| Get visibility into traffic with standard and real-time logs, and analyze them |
CloudFront observability |
| Serve multiple domains through shared configuration with per-tenant customization (SaaS, platform) |
multi-tenant distributions |
Routing notes
- Choosing the layer and creating a distribution vs the rest. Whether CloudFront is the right
entry layer, what it integrates with, creating a distribution, caching, and pricing live in the
when-to-use reference. The other references assume a distribution exists and configure one
aspect of it.
- Protecting origins vs securing content. Locking the origin so it is reachable only through
CloudFront (OAC, VPC origins, origin mTLS) is the protecting-your-origins reference. Restricting
which viewers can see content (signed URLs and cookies, geographic restrictions, viewer mTLS,
edge token validation) is the securing-your-content reference. They are paired: a content control
only holds when the origin is also locked.
- Viewer mTLS vs origin mTLS. Authenticating the client to CloudFront (viewer mTLS) is content
security. Authenticating CloudFront to the origin (origin mTLS) is origin protection. Different
controls, different references.
- Custom domain certificate vs Route 53 DNS cutover. Requesting and validating the ACM
certificate and adding the alternate domain name is the managing-certificates reference here.
Pointing the domain's DNS at the distribution, including the zone apex alias and any failover, is
Route 53 work owned by the separate
routing-traffic-with-route53-and-cloudfront
skill.
Cross-service work
Pointing a custom domain's DNS at a CloudFront distribution, or failing over between distributions
with Route 53 records, is cross-service work owned by the separate
routing-traffic-with-route53-and-cloudfront
skill. Use this skill for the CloudFront-side configuration only.
Verification and Recovery
- Re-read the distribution and confirm
Status is Deployed, the expected aliases and origins are
present, and the last-modified time reflects the intended change.
- Probe the public hostname over HTTPS and record status, certificate hostname, cache headers, and
an expected object checksum or body assertion. A successful HTTP code alone is insufficient.
- Verify the origin is not unintentionally public when origin restriction was in scope.
- If verification fails, stop additional changes, preserve the distribution
ETag and prior config,
restore the reviewed prior configuration with an If-Match guard, and verify again. Never retry a
stale write after an ETag conflict.
Evaluation Prompts
- Normal: “Put CloudFront in front of this S3 origin and define objective post-deploy checks.”
- Difficult edge: “Move a custom domain to CloudFront without exposing the origin or changing DNS
before the certificate and distribution are ready.”
- Should not activate: “Create a weighted Route 53 record between two non-CloudFront endpoints.”
Source Boundary
CloudFront service behavior and regional constraints are sourced from the AWS documentation below.
The read-first workflow, evidence retention, verification assertions, and rollback guard are curator
recommendations.
Additional Resources
1---2name: cloudfront3description: Use when configuring Amazon CloudFront distributions, caching, pricing, certificates, origins, viewer access, multi-tenant delivery, or logs. Route DNS-to-CloudFront work to the linked routing-traffic-with-route53-and-cloudfront skill and pure DNS work to route53.4license: Apache-2.05---67# Amazon CloudFront89## When to Use1011- Design, create, or tune a CloudFront distribution, cache policy, or pricing model.12- Configure CloudFront certificates, alternate domain names, origins, or origin access controls.13- Restrict viewer access or investigate standard and real-time CloudFront logs.14- Route custom-domain DNS changes to15 [routing-traffic-with-route53-and-cloudfront](https://github.com/mouadja02/skills/blob/main/skills/cloud-aws/networking/routing-traffic-with-route53-and-cloudfront/SKILL.md).1617Do not use this skill for pure Route 53 DNS administration. Use18[route53](https://github.com/mouadja02/skills/blob/main/skills/cloud-aws/networking/route53/SKILL.md). Do not use it for the Route 53 alias-record portion of a CloudFront19custom domain; use the cross-service skill linked above.2021## Prerequisites and Quick Reference2223- Confirm the AWS account, region context, distribution ID, origins, hostnames, and change window.24- Prefer read-only discovery before proposing mutations; never print credentials or certificate keys.25- CloudFront and its ACM certificate region use `us-east-1`; verify this before certificate work.26- Read the matching reference in the task table, execute its checks, and retain command output for27 verification.2829## Overview3031Domain expertise for configuring Amazon CloudFront content delivery: deciding when to use32CloudFront and how it fits the wider architecture, managing custom-domain certificates and33multi-tenant distributions, protecting origins, securing content, and observing traffic.3435This skill is a router. Each customer task maps to a procedure file under `references/`. Read the36matching reference in full before acting, then follow its constraints and steps. The reference37files are self-contained: each carries its own decision tables, constraints, procedure, and38troubleshooting.3940Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,41observability). Fall back to the AWS CLI otherwise. CloudFront is a global service; its API calls42and the AWS Certificate Manager (ACM) certificates it uses are made in `us-east-1` regardless of43where the customer's application runs.4445## Which CloudFront task do you need?4647| Goal | Reference |48| --- | --- |49| Decide whether CloudFront is the right layer, see how it integrates, create a distribution, tune caching, or choose pricing | [when to use CloudFront](references/when-to-use-cloudfront.md) |50| Serve a custom domain over HTTPS, manage ACM certificates, or run many domains with a certificate per tenant | [managing certificates with CloudFront](references/managing-certificates-with-cloudfront.md) |51| Make CloudFront the only way to reach the origin (S3 OAC, VPC origins, origin mutual TLS, security groups) | [protecting your origins](references/protecting-your-origins.md) |52| Limit who can view content by identity, location, client certificate, or auth token | [securing your content](references/securing-your-content.md) |53| Get visibility into traffic with standard and real-time logs, and analyze them | [CloudFront observability](references/cloudfront-observability.md) |54| Serve multiple domains through shared configuration with per-tenant customization (SaaS, platform) | [multi-tenant distributions](references/multi-tenant-distributions.md) |5556## Routing notes5758- **Choosing the layer and creating a distribution vs the rest.** Whether CloudFront is the right59 entry layer, what it integrates with, creating a distribution, caching, and pricing live in the60 when-to-use reference. The other references assume a distribution exists and configure one61 aspect of it.62- **Protecting origins vs securing content.** Locking the origin so it is reachable only through63 CloudFront (OAC, VPC origins, origin mTLS) is the protecting-your-origins reference. Restricting64 which viewers can see content (signed URLs and cookies, geographic restrictions, viewer mTLS,65 edge token validation) is the securing-your-content reference. They are paired: a content control66 only holds when the origin is also locked.67- **Viewer mTLS vs origin mTLS.** Authenticating the client to CloudFront (viewer mTLS) is content68 security. Authenticating CloudFront to the origin (origin mTLS) is origin protection. Different69 controls, different references.70- **Custom domain certificate vs Route 53 DNS cutover.** Requesting and validating the ACM71 certificate and adding the alternate domain name is the managing-certificates reference here.72 Pointing the domain's DNS at the distribution, including the zone apex alias and any failover, is73 Route 53 work owned by the separate74 [routing-traffic-with-route53-and-cloudfront](https://github.com/mouadja02/skills/blob/main/skills/cloud-aws/networking/routing-traffic-with-route53-and-cloudfront/SKILL.md)75 skill.7677## Cross-service work7879Pointing a custom domain's DNS at a CloudFront distribution, or failing over between distributions80with Route 53 records, is cross-service work owned by the separate81[routing-traffic-with-route53-and-cloudfront](https://github.com/mouadja02/skills/blob/main/skills/cloud-aws/networking/routing-traffic-with-route53-and-cloudfront/SKILL.md)82skill. Use this skill for the CloudFront-side configuration only.8384## Verification and Recovery85861. Re-read the distribution and confirm `Status` is `Deployed`, the expected aliases and origins are87 present, and the last-modified time reflects the intended change.882. Probe the public hostname over HTTPS and record status, certificate hostname, cache headers, and89 an expected object checksum or body assertion. A successful HTTP code alone is insufficient.903. Verify the origin is not unintentionally public when origin restriction was in scope.914. If verification fails, stop additional changes, preserve the distribution `ETag` and prior config,92 restore the reviewed prior configuration with an `If-Match` guard, and verify again. Never retry a93 stale write after an `ETag` conflict.9495## Evaluation Prompts9697- **Normal:** “Put CloudFront in front of this S3 origin and define objective post-deploy checks.”98- **Difficult edge:** “Move a custom domain to CloudFront without exposing the origin or changing DNS99 before the certificate and distribution are ready.”100- **Should not activate:** “Create a weighted Route 53 record between two non-CloudFront endpoints.”101102## Source Boundary103104CloudFront service behavior and regional constraints are sourced from the AWS documentation below.105The read-first workflow, evidence retention, verification assertions, and rollback guard are curator106recommendations.107108## Additional Resources109110- [Amazon CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html)111- [Security best practices for Amazon CloudFront (Amazon CloudFront Developer Guide)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/security-best-practices.html)112- [Amazon CloudFront product page](https://aws.amazon.com/cloudfront/)113- [Amazon CloudFront pricing](https://aws.amazon.com/cloudfront/pricing/)