aws-cloudformation

Author, validate, and troubleshoot AWS CloudFormation templates across the full deployment lifecycle.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-cloudformation-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-cloudformation
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/aws-cloudformation
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-cloudformation-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? CloudFormation templates fail for many reasons—schema errors, security misconfigurations, name conflicts, and runtime IAM or quota issues—and diagnosing them requires knowing which tools and APIs to use at each stage. This Skill provides structured procedures for authoring templates with secure defaults, validating them before deployment, and diagnosing failed stacks without guesswork. ## Core Features & Use Cases - Template Authoring: Apply best-practice checklists covering secure S3 defaults, DeletionPolicy on stateful resources, parameter constraints, and avoidance of hardcoded resource names. - Three-Layer Validation: Run cfn-lint for syntax and schema, cfn-guard for security compliance, and change set pre-deployment validation via the describe-events API. - Failure Diagnosis: Retrieve failed events with the FailedEvents filter, correlate with CloudTrail in a ±60 second window, and classify fixes as template-level or environment-level. - Use Case: A stack is stuck in UPDATE_ROLLBACK_FAILED. The Skill pulls only the failed events, identifies the first real failure (e.g., an IAM permission gap), distinguishes it from cascade cancellations, and provides the exact IAM statement or template fix. ## Quick Start Ask the assistant to validate my CloudFormation template and troubleshoot why my stack deployment failed.

Frequently Asked Questions about aws-cloudformation

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

FAQPage Schema
How do I validate a CloudFormation template before deployment?

Run three validation layers in order: cfn-lint for syntax and schema errors, cfn-guard for security and compliance rules, and a change set for pre-deployment validation. Validation errors from change sets are retrieved via aws cloudformation describe-events with the change set ARN.

How do I troubleshoot a failed CloudFormation stack deployment?

Use aws cloudformation describe-events with --filters FailedEvents=true to get only failure events, then examine each ResourceStatusReason. Correlate the first failure with CloudTrail events in a ±60 second window to find the underlying AWS API error.

Why does describe-stack-events not show CloudFormation validation errors?

The legacy describe-stack-events API only returns resource provisioning events after execution begins and does not support filters. Pre-deployment validation errors are only exposed through the newer describe-events API scoped to the change set.

What secure defaults should CloudFormation templates include for S3 buckets?

S3 buckets should include PublicAccessBlockConfiguration with all four settings true, BucketEncryption, and VersioningConfiguration for data buckets. Stateful resources should also have DeletionPolicy: Retain and UpdateReplacePolicy: Retain to prevent data loss.

When should I use CloudFormation instead of CDK?

Choose plain CloudFormation when existing templates are YAML/JSON, the workload is simple with fewer than 50 resources, or the team has no CDK experience. Choose CDK when the workload benefits from reusable abstractions or the team already uses it.

Why does my CloudFormation change set show no validation events?

The describe-events API requires a recent AWS CLI version, so upgrade the CLI if the command is unrecognized. Also confirm the change set has reached a terminal status like CREATE_COMPLETE or FAILED before querying events.