storage-and-cdn

Design cloud storage and CDN solutions with S3, presigned URLs, and CloudFront.

3|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill storage-and-cdn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storage-and-cdn
Source: https://github.com/mauriciodelrio/delriodev-skills/tree/main/es-skills/software/architecture/storage-and-cdn
Command: npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill storage-and-cdn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ayuda a equipos a decidir, diseñar y desplegar soluciones seguras y coste-eficientes para almacenar archivos de usuarios, servir assets estáticos y distribuir media globalmente con CDNs.

Core Features & Use Cases

  • Árbol de decisión para seleccionar entre uploads de usuarios, assets estáticos, backups y archivos temporales.
  • Patrón de upload seguro con presigned URLs y recomendaciones para evitar pasar archivos por el backend.
  • Configuración de S3: versioning, encryption, lifecycle policies y organización de keys.
  • CDN (CloudFront): cache behaviors, orígenes protegidos y recomendaciones de certificate management.
  • Procesamiento de imágenes/video: arquitecturas con Lambda+Sharp, Imgproxy self-hosted y alternativas gestionadas (Cloudinary, Imgix, Mux).
  • IaC y ejemplos: snippets Terraform y TypeScript para generar presigned URLs, procesar uploads y crear distribuciones CDN.
  • Reglas por presupuesto y gotchas para evitar buckets públicos, leaks de URLs predecibles y crecimiento inesperado de storage.

Quick Start

Configura un bucket S3 privado con presigned URLs, activa versioning y lifecycle policies, y pon CloudFront como distribución protegida para servir los assets de forma global y segura.

Frequently Asked Questions about storage-and-cdn

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

FAQPage Schema
How do I securely handle user uploads to S3 without passing files through my backend?

Configure S3 with versioning, encryption, and lifecycle policies, then generate presigned URLs to allow secure direct uploads. Serve content globally via a protected CloudFront distribution with appropriate cache behaviors and origin access controls to restrict direct bucket access.

What is the best way to configure S3 lifecycle policies for cost-aware storage?

S3 lifecycle policies automatically transition objects between storage tiers based on age to optimize costs. Configuring versioning alongside lifecycle rules ensures you manage storage growth and safely expire older versions or temporary files without manual intervention.

Does CloudFront work with private S3 buckets for serving static media?

CloudFront integrates with private S3 buckets via Origin Access Control to securely serve static media globally. This configuration applies custom cache behaviors, protects the bucket from public access, and manages TLS certificates for secure content delivery.

What is the best way to process images and video after users upload files to S3?

Image and video processing pipelines can use Lambda with Sharp, self-hosted Imgproxy, or managed services like Cloudinary. These options trigger post-upload transformations such as resizing or format conversion, operating independently of your main backend application.

Can I deploy S3 storage and CloudFront CDN infrastructure using Terraform?

You can deploy S3 storage and CloudFront CDN infrastructure using Terraform examples for infrastructure as code. Terraform provisions buckets with encryption and versioning, configures lifecycle policies, and sets up protected CDN distributions with appropriate cache behaviors.

Why should I avoid making S3 buckets public for hosting user uploads?

Making S3 buckets public for user uploads exposes data to unauthorized access and creates predictable URL leaks. Using private buckets with presigned URLs and CloudFront distribution ensures secure, controlled access and prevents unexpected storage cost growth.