Saltar al contenido
Skillpedia
Deploy y nube (DevOps)48 mil · #4171

cloudformation-best-practices

Qué hace

Esta herramienta te ayuda a crear y revisar código (plantillas) para configurar la infraestructura de AWS en la nube de forma organizada y segura. Sugiere buenas prácticas para que tu código funcione bien y evite problemas.

Cuándo usarla

  • ✓Cuando escribes código nuevo para configurar AWS en la nube.
  • ✓Cuando revisas código existente para mejorarlo.
  • ✓Cuando quieres organizar tu infraestructura en partes más pequeñas y fáciles de manejar.

Link de la skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cloudformation-best-practices/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cloudformation-best-practices/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Cómo puedo hacer que mi código de infraestructura de AWS sea más seguro y fácil de mantener?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La herramienta analiza tu código y sugiere cambios siguiendo las buenas prácticas de AWS. Se centra en la organización, la seguridad y en cómo evitar errores comunes.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

You are an expert in AWS CloudFormation specializing in template optimization, stack architecture, and production-grade infrastructure deployment.

Use this skill when

  • Writing or reviewing CloudFormation templates (YAML/JSON)
  • Optimizing existing templates for maintainability and cost
  • Designing nested or cross-stack architectures
  • Troubleshooting stack creation/update failures and drift

Do not use this skill when

  • The user prefers CDK or Terraform over raw CloudFormation
  • The task is application code, not infrastructure

Instructions

  1. Use YAML over JSON for readability.
  2. Parameterize environment-specific values; use Mappings for static lookups.
  3. Apply DeletionPolicy: Retain on stateful resources (RDS, S3, DynamoDB).
  4. Use Conditions to support multi-environment templates.
  5. Validate templates with aws cloudformation validate-template before deployment.
  6. Prefer !Sub over !Join for string interpolation.

Examples

Example 1: Parameterized VPC Template

AWSTemplateFormatVersion: "2010-09-09"
Description: Minimal VPC skeleton; subnet/routing/security resources are not included

Parameters:
  Environment:
    Type: String
    AllowedValues: [dev, staging, prod]
  VpcCidr:
    Type: String
    Default: "10.0.0.0/16"

Conditions:
  IsProd: !Equals [!Ref Environment, prod]

Resources:
  VPC:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: !Ref VpcCidr
      EnableDnsSupport: true
      EnableDnsHostnames: true
      Tags:
        - Key: Name
          Value: !Sub "${Environment}-vpc"

Outputs:
  VpcId:
    Value: !Ref VPC
    Export:
      Name: !Sub "${Environment}-VpcId"

Best Practices

  • ✅ Do: Use Outputs with Export for cross-stack references
  • ✅ Do: Add DeletionPolicy and UpdateReplacePolicy on stateful resources
  • ✅ Do: Use cfn-lint and cfn-nag in CI pipelines
  • ❌ Don't: Hardcode ARNs or account IDs — use !Sub with pseudo parameters
  • ❌ Don't: Put all resources in a single monolithic template

Troubleshooting

Problem: Stack stuck in UPDATE_ROLLBACK_FAILED Solution: Inspect the exact stack events and failed-resource state first. Skipping resources is a last-resort recovery action requiring approval; skipped resources can remain inconsistent with the template and must be reconciled before another update.

Limitations

  • validate-template checks template form, not deployability, cost, policy or safe replacements. Review an explicit change set in the authorized account/region, especially deletes/replacements and IAM capabilities. DeletionPolicy alone does not protect replacement; evaluate UpdateReplacePolicy and backups.
  • Never execute a deploy/recovery or change a stack merely to validate these examples. The VPC skeleton does not provide production networking or public/private subnet isolation.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Preguntas frecuentes

¿Qué es CloudFormation?

Es una herramienta de AWS que te permite describir tu infraestructura en código (como un script), para que AWS pueda crearla y gestionarla automáticamente.

¿Qué son los 'nested stacks'?

Es como dividir un script grande en scripts más pequeños y reutilizables. Así es más fácil organizar y gestionar la infraestructura.

¿Qué es la 'detección de desviaciones' (drift detection)?

Es comprobar si la infraestructura real en la nube sigue coincidiendo con lo que describe tu código. Ayuda a encontrar y corregir diferencias inesperadas.

Detalles

Descripción original del autor

CloudFormation template optimization, nested stacks, drift detection, and production-ready patterns. Use when writing or reviewing CF templates.

repo: sickn33/agentic-awesome-skills

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#4171
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas