opensite-ai/opensite-skills / aws-cloudformation
aws-cloudformation
UnverifiedAuthors, validates, and troubleshoots AWS CloudFormation templates. Covers template authoring with secure defaults, local validation with either cfn-lint or cloudformation-validate, cfn-guard security and compliance checks as a recommended default, account-aware CloudFormation service pre-deployment validation, CloudFormation Express mode for faster deployments, and root-cause diagnosis of failed stacks using CloudFormation events and CloudTrail correlation. Also covers author-time template intelligence with the CloudFormation Language Server and published cloudformation-validate libraries.
| File | Kind | Size |
|---|---|---|
| .aws-skill-metadata | other | 18 B |
| SKILL.md | skill md | 14.2 KB |
| references/author-cloudformation-best-practices.script.md | markdown | 8.9 KB |
| references/check-cloudformation-template-compliance.script.md | markdown | 7.9 KB |
| references/cloudformation-language-server.md | markdown | 8.1 KB |
| references/cloudformation-pre-deploy-validation.script.md | markdown | 19.5 KB |
| references/deploy-with-express-mode.script.md | markdown | 12.3 KB |
| references/lookup-resource-properties.script.md | markdown | 6.3 KB |
| references/persist-template-context.script.md | markdown | 14.4 KB |
| references/retrieve-template-context.script.md | markdown | 18.9 KB |
| references/security-considerations.md | markdown | 4.4 KB |
| references/template-safety-guidance.md | markdown | 8.1 KB |
| references/troubleshoot-deployment.script.md | markdown | 12.4 KB |
| references/troubleshoot-failed-stack.script.md | markdown | 9.1 KB |
| references/validate-with-cfn-lint.script.md | markdown | 7.8 KB |
| references/validate-with-cloudformation-validate.script.md | markdown | 9.2 KB |
| references/validation-tool-selection.md | markdown | 3.7 KB |
references/validation-tool-selection.md
View on GitHub# CloudFormation Validation Workflow
## Purpose
Use this guide to choose and sequence CloudFormation validation. Run the applicable layers in this order:
1. One local validator for syntax, schema, and resource-property checks.
2. cfn-guard for security and compliance checks.
3. CloudFormation service pre-deployment validation when account-aware checks are needed.
Each layer has different coverage. Report the outcome of each layer separately rather than treating one successful check as proof that the template is deployment-ready.
**AWS MCP server:** For steps that call AWS APIs, the AWS MCP server (`call_aws`) is recommended for sandboxed execution and audit logging, but it is not required. Every account-aware step also works with the AWS CLI; local validator steps require neither mechanism.
## Select one local validator
Use exactly one local validation tool unless the user explicitly requests a comparison. Honor an explicit tool request first. Otherwise, reuse the tool configured by the project. If the project configures neither tool, use `cfn-lint` when it is installed; if it is not installed but the `cfn-validate` CLI is installed, use cloudformation-validate. If neither tool is installed, propose an exact-version cfn-lint installation as the deterministic default and follow the cfn-lint SOP approval flow. Do not propose installing both tools.
- **cfn-lint:** Follow the [validate with cfn-lint SOP](validate-with-cfn-lint.script.md).
- **cloudformation-validate:** Follow the [validate with cloudformation-validate SOP](validate-with-cloudformation-validate.script.md).
Follow the selected SOP's dependency and approval flow if its tool is unavailable. Do not install or download a tool without explicit user approval because those actions change the user's environment.
For validation embedded in code or another process, use a published cloudformation-validate library for the application's language. Follow the in-process and CDK integration guidance in the [cloudformation-validate SOP](validate-with-cloudformation-validate.script.md).
## Run security and compliance checks by default
After local validation has no blocking findings, run the [cfn-guard security and compliance SOP](check-cloudformation-template-compliance.script.md) by default. Do not require the user to opt in.
Skip this layer only when the user explicitly requests a skip or confirms that an equivalent project security and compliance check already passed. If cfn-guard, its binding, or applicable rules are unavailable, follow the SOP's dependency and approval flow rather than silently omitting the check. If the layer is skipped or cannot run, state that security and compliance were not evaluated.
## Add account-aware pre-deployment validation
When account-aware checks are needed before deployment, follow the [CloudFormation service pre-deployment validation SOP](cloudformation-pre-deploy-validation.script.md).
Before using CloudFormation service operations, confirm that the CloudTrail controls in the Security Considerations section are satisfied. If required audit logging is unavailable, state the reduced auditability.
Pre-deployment validation is enabled by default on Create Stack, Update Stack, and change-set creation. A `FAIL`-mode finding halts the operation before any resource is provisioned. Retrieve validation results with `describe-events` using the scoping guidance in the pre-deployment SOP; do not use `describe-stack-events` because it does not return these validation results.
## Security Considerations
Follow the [shared security guidance](security-considerations.md).
Report local, security and compliance, and service pre-deployment validation as separate outcomes; one successful layer does not prove another passed.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |