cloudfront-cdn

Design and operate Amazon CloudFront CDN distributions with caching and edge processing.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill cloudfront-cdn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudfront-cdn
Source: https://github.com/engineers-hub-ltd-in-house-project/eh-skills/tree/main/skills/aws-infrastructure/cloudfront-cdn
Command: npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill cloudfront-cdn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design and operate Amazon CloudFront CDN distributions to achieve low latency and high availability for static and dynamic content delivery, while enhancing security.

Core Features & Use Cases

  • Distribution Configuration: Set up CloudFront distributions with S3 origins, ALB origins, and custom domains.
  • Caching Strategies: Implement effective caching policies for static assets, API responses, and SPA routing.
  • Edge Processing: Utilize CloudFront Functions and Lambda@Edge for request/response manipulation.
  • Security Enhancements: Configure Origin Access Control (OAC), WAF integration, and security headers.
  • Use Case: Deploy a Single Page Application (SPA) with a dynamic API backend, ensuring optimal performance and security by leveraging CloudFront's caching, edge functions, and WAF integration.

Quick Start

Configure a CloudFront distribution with an S3 origin and OAC for static website hosting.

Frequently Asked Questions about cloudfront-cdn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure CloudFront caching for a Single Page Application with dynamic API responses?

To configure CloudFront caching for an SPA, implement distinct cache behaviors for static assets versus dynamic API responses. This ensures optimal performance by serving static content from S3 origins while routing API traffic to ALB origins for low latency delivery.

What is the best way to secure an S3 origin using CloudFront?

Securing an S3 origin using CloudFront is best achieved by implementing Origin Access Control (OAC). OAC restricts direct public access to your S3 buckets, ensuring that users can only access your static content through CloudFront CDN distributions.

Can I use Lambda@Edge and CloudFront Functions for request and response manipulation?

Yes, you can use Lambda@Edge and CloudFront Functions for request and response manipulation at the edge. This approach allows you to execute custom logic closer to your users, modifying headers or rewriting URLs to achieve low latency and high availability.

How does WAF integration with CloudFront enhance security for dynamic content delivery?

WAF integration with CloudFront enhances security for dynamic content delivery by filtering malicious traffic at edge locations. This prevents malicious requests from reaching your ALB origins, protecting your APIs while maintaining high availability and low latency.

When do I need custom error pages in a CloudFront distribution?

You need custom error pages in a CloudFront distribution when hosting Single Page Applications to handle client-side routing properly. Configuring custom error responses ensures that 404 errors return your application's index document, allowing the SPA router to handle the request.