# Validate CloudFormation templates before deploy with cfn-lint

> Catch CloudFormation schema, region, and intrinsic-function mistakes before a stack update fails in review or deployment.

- Skill: `agentskillexchange/validate-cloudformation-templates-before-deploy-with-cfn-lin` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/validate-cloudformation-templates-before-deploy-with-cfn-lin`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/validate-cloudformation-templates-before-deploy-with-cfn-lin/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/validate-cloudformation-templates-before-deploy-with-cfn-lin

---


# Validate CloudFormation templates before deploy with cfn-lint

Catch CloudFormation schema, region, and intrinsic-function mistakes before a stack update fails in review or deployment.

## Prerequisites

Python or cfn-lint binary, CloudFormation templates

## Installation

Use the upstream install or setup path that matches your environment:
- pip install cfn-lint. If pip is not available, run
- brew install cfn-lint
- docker build --tag cfn-lint:latest .
- docker run --rm -v pwd:/data cfn-lint:latest /data/template.yaml

Requirements and caveats from upstream:
- <img alt="[cfn-lint logo]" src="https://github.com/aws-cloudformation/cfn-python-lint/blob/main/logo.png?raw=true" width="150" align="right">
- [![codecov](https://codecov.io/gh/aws-cloudformation/cfn-lint/branch/main/graph/badge.svg)](https://codecov.io/gh/aws-cloudformation/cfn-python-lint)
- Python 3.10 to 3.14 are supported.

Basic usage or getting-started notes:
- _To get information about the [SAM Transformation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html), run the linter with --info_
- ### Pip
- #### Optional dependencies

- Source: https://github.com/aws-cloudformation/cfn-lint
- Extracted from upstream docs: https://raw.githubusercontent.com/aws-cloudformation/cfn-lint/HEAD/README.md

## Documentation

- https://github.com/aws-cloudformation/cfn-lint

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/validate-cloudformation-templates-before-deploy-with-cfn-lint/)

