К основному содержанию
скилл CX Codex

cloudfront — скилл для Claude Code: раздача контента в AWS

Скилл по Amazon CloudFront: помогает решить, когда ставить CDN, настроить сертификаты, закрыть origin и ограничить доступ к контенту.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add aws/agent-toolkit-for-aws --skill cloudfront -a claude-code
Открыть на GitHub

Что делает cloudfront

Скилл работает как маршрутизатор. Каждая задача сопоставляется с файлом в references/, и агент читает нужный файл целиком, прежде чем что-то делать. Внутри шесть направлений: выбор CloudFront и его места в архитектуре, сертификаты для своего домена, мультитенантные дистрибуции, защита origin, ограничение доступа к контенту и логи.

Команды выполняются через AWS MCP-сервер, если он подключён, иначе через AWS CLI. CloudFront — глобальный сервис: и его API-вызовы, и сертификаты ACM делаются в us-east-1, где бы ни крутилось ваше приложение. Это стоит держать в голове, если регион приложения не совпадает.

Скилл не покрывает DNS-часть своего домена и переключение между дистрибуциями через Route 53 — для этого есть отдельный скилл route53-cloudfront. Здесь только конфигурация со стороны CloudFront.

Какие задачи решает

  • решить, нужен ли CloudFront перед контентом
  • выпустить сертификат ACM для своего домена
  • закрыть origin так, чтобы он был доступен только через CloudFront
  • ограничить просмотр по геолокации или подписанным ссылкам
  • разобрать стандартные и real-time логи трафика

Примеры запросов агенту

  • Настрой CloudFront перед моим S3-бакетом и закрой origin через OAC
  • Помоги выпустить сертификат ACM в us-east-1 для домена и добавить alternate domain name
  • Ограничь доступ к контенту подписанными URL и гео-ограничениями

Как установить cloudfront

1Через Skills CLI (Vercel)

npx skills add aws/agent-toolkit-for-aws --skill cloudfront -a claude-code

2Вручную: положить файлы

~/.claude/skills/cloudfront/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/cloudfront/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о cloudfront

Как установить cloudfront в Claude?

Выполните npx skills add aws/agent-toolkit-for-aws --skill cloudfront -a claude-code. Скилл появится в ~/.claude/skills/cloudfront/SKILL.md.

Что делает скилл cloudfront?

Проводит по шести задачам CloudFront: выбор слоя и создание дистрибуции, сертификаты для своего домена, мультитенантные дистрибуции, защита origin, ограничение доступа и логи.

Чем этот скилл отличается от route53-cloudfront?

Здесь только конфигурация со стороны CloudFront. Направление DNS домена на дистрибуцию и переключение между дистрибуциями через Route 53 — работа скилла route53-cloudfront.

Исходный текст

SKILL.md · Apache-2.0
---
name: cloudfront
description: >
  Configures Amazon CloudFront content delivery across six workflows: when to use CloudFront and
  how it fits with AWS WAF, Shield, CloudFront Functions, Lambda@Edge, Route 53, and origins
  (creating a distribution, caching, and Flat Rate Pricing (FRP) versus pay-as-you-go pricing); managing
  custom-domain TLS certificates (ACM in us-east-1); configuring multi-tenant distributions;
  protecting origins with origin access control (OAC), VPC origins, and origin mutual TLS (mTLS);
  securing content with signed URLs and cookies, geographic restrictions, viewer mutual TLS, and
  edge token validation; and observing traffic with standard and real-time logs. Applicable when the
  customer wants to put CloudFront in front of content, choose pricing, lock an origin, restrict who
  can view content, or analyze logs. Not applicable for the Route 53 DNS side of a CloudFront custom
  domain or failover between distributions (see the route53-cloudfront skill), or for pure-Route 53
  DNS work (see the route53 skill).
version: 1
---

# Amazon CloudFront

## 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](references/when-to-use-cloudfront.md) |
| 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) |
| 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) |
| Limit who can view content by identity, location, client certificate, or auth token | [securing your content](references/securing-your-content.md) |
| Get visibility into traffic with standard and real-time logs, and analyze them | [CloudFront observability](references/cloudfront-observability.md) |
| Serve multiple domains through shared configuration with per-tenant customization (SaaS, platform) | [multi-tenant distributions](references/multi-tenant-distributions.md) |

## 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 `route53-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 `route53-cloudfront` skill. Use
this skill for the CloudFront-side configuration only.

## Additional Resources

- [Amazon CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html)
- [Security best practices for Amazon CloudFront (Amazon CloudFront Developer Guide)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/security-best-practices.html)
- [Amazon CloudFront product page](https://aws.amazon.com/cloudfront/)
- [Amazon CloudFront pricing](https://aws.amazon.com/cloudfront/pricing/)

© aws · Apache-2.0 · aws/agent-toolkit-for-aws

Похожие скиллы

Всё по теме «Облака: AWS, Azure, GCP» →
cdn-setup devops-skills Скилл помогает настроить CDN через CloudFront и Cloudflare: раздавать статику, защищать трафик по TLS и сбрасывать кеш. Пригодится при публикации сайтов и API. CX Codex +1 324установок django-storages-s3 https://github.com/awais786 Скилл настраивает хранение статики и медиафайлов Django в AWS S3 через django-storages и boto3: словарь STORAGES, presigned-ссылки, CloudFront, IAM. CX Codex +1 900установок setup-cdn-optimization davila7 Слэш-команда разбирает трафик и типы контента, затем настраивает CDN: кэш, сжатие, картинки, инвалидацию. 218установок terraform-engineer https://github.com/Jeffallan Скилл для написания и управления инфраструктурой через Terraform. Помогает проектировать модули, настраивать удалённое состояние, валидировать код и применять изменения безопасно. CX Codex +1 5 400установок aws-ami-builder hashicorp Скилл подсказывает агенту, как собрать Amazon Machine Image через Packer и билдер amazon-ebs: шаблон, фильтры исходного образа, команды сборки. CX Codex +1 3 200установок aws-diagrams Eraser Labs Строит архитектурные схемы AWS из шаблонов CloudFormation, вывода AWS CLI или простого описания. Пригодится, когда нужно показать инфраструктуру, а не рисовать её руками. CX Codex +1 1 200установок

Из того же набора133

amazon-elasticache Скилл маршрутизирует задачи по ElastiCache: от выбора движка и настройки кэша до моделирования данных, GenAI-сценариев и мониторинга. CX Codex +1 5 400установок aws-blocks Скилл ведёт агента по AWS Blocks: выбор Building Blocks, локальная разработка и деплой. Пригодится, когда бэкенд живёт в каталоге aws-blocks/. CX Codex +1 5 500установок querying-aws-cloudwatch Помогает выполнять SQL-запросы через Amazon Athena к логам CloudWatch, выгруженным в таблицы Apache Iceberg в S3 Tables. Пригодится при расследовании инцидентов и сетевых сбоев. CX Codex +1 5 500установок amazon-aurora-mysql Скилл для работы с кластерами Amazon Aurora MySQL: создание, изменение, подбор ACU, оценка хранилища и планирование апгрейда. CX Codex +1 5 200установок processing-s3-uploads-with-step-functions Развёртывает обработку загрузок в S3: небольшие файлы отправляет в Lambda, крупные — в Fargate через Step Functions. CX Codex +1 5 000установок amazon-documentdb Скилл для работы с Amazon DocumentDB: поднимает кластер, разбирает ошибки подключения, переносит данные из MongoDB и проверяет инсталляцию по 41 пункту. CX Codex +1 5 000установок deploying-custom-domain-rest-api Разворачивает региональный REST API в AWS с собственным доменом, функцией на AWS Lambda и авторизатором запросов через AWS CLI. CX Codex +1 5 000установок amazon-dynamodb Скилл проводит агента по проектированию, ревью и отладке слоя данных на DynamoDB: перечисляет паттерны доступа, выбирает ключи и GSI, считает месячную стоимость. CX Codex +1 5 100установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой