aws-cloudformation

Authors, validates, and troubleshoots AWS CloudFormation templates across the full deployment lifecycle.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/dennisvink/yolomancer --skill aws-cloudformation-dennisvink
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-cloudformation
Source: https://github.com/dennisvink/yolomancer/tree/main/skills/aws/core-skills/aws-cloudformation
Command: npx skills add https://github.com/dennisvink/yolomancer --skill aws-cloudformation-dennisvink

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing and deploying CloudFormation templates involves subtle schema rules, security pitfalls, and cryptic deployment failures. This Skill guides the full lifecycle: authoring templates with secure defaults, validating them before deployment, and diagnosing root causes when stacks fail. ## Core Features & Use Cases - Template Authoring with Secure Defaults: Applies best practices like S3 public access blocks, encryption at rest, DeletionPolicy on stateful resources, and Secrets Manager dynamic references instead of plaintext secrets. - Three-Layer Pre-Deployment Validation: Runs cfn-lint for syntax, cfn-guard for security compliance, and CloudFormation pre-deployment validation via change sets to catch errors before any resource is provisioned. - Failure Troubleshooting: Diagnoses failed stacks using describe-events with failure filters and CloudTrail correlation, distinguishing real errors from rollback cascade noise. - Use Case: A stack fails with UPDATE_ROLLBACK_FAILED. The Skill retrieves only failure events, identifies that an IAM role lacks permissions for multiple services, and enumerates every permission gap so you fix them all in one pass. ## Quick Start Ask the AI to review your CloudFormation template for security issues and validate it before deployment, for example: "Validate my template.yaml with cfn-lint and cfn-guard, then run pre-deployment validation with a change set."

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 CloudFormation pre-deployment validation by creating a change set. Retrieve validation results with aws cloudformation describe-events scoped to the change set ARN, not describe-stack-events.

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 event's ResourceStatusReason. Events with specific errors are real failures, while "Resource creation cancelled" messages are rollback cascade noise. Classify fixes as template-level or environment-level.

What is the difference between CloudFormation Express mode and CDK hotswap?

Express mode deploys full infrastructure through CloudFormation and completes when resource configuration is applied, introducing no drift. CDK hotswap patches code-only changes via direct service APIs, bypassing CloudFormation and introducing drift. Express mode is activated with --deployment-config '{"mode": "EXPRESS"}' or cdk deploy --express.

Does CloudFormation pre-deployment validation work with change sets?

Yes, change set creation runs all pre-deployment validation checks without provisioning any resources, including WARN-only checks like service quota and S3 bucket emptiness. This makes change sets the recommended pre-flight validation path before committing to a deployment.

Why should I avoid hardcoded resource names in CloudFormation templates?

Hardcoded physical names prevent multiple deployments of the same template and block blue/green resource replacement. Use !Sub "${AWS::StackName}-suffix" or omit the name to let CloudFormation generate a unique one, unless an external system requires a fixed name.

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 CDK.