Add the VS Code extension
- Open the Extensions pane in Visual Studio Code (click the Extensions icon in the Activity Bar or use the three dots → Extensions).
- Search for
cfn-lint. - Install the extension named “CloudFormation Linter” (
vscode-cfn-lint).

Open a template to see problems
After installing the extension, open a CloudFormation template. Example YAML:CFN-Lint requires Python 3.8 or later. Ensure Python and
pip are installed and available on your PATH. After installing the CLI, restart VS Code so the extension can detect cfn-lint.On Windows, add Python and your Scripts directory (e.g.
C:\Users\<you>\AppData\Local\Programs\Python\Python39\Scripts) to your PATH. On macOS/Linux, verify which python3 and which pip3 (or python3 --version) to confirm availability.Where to get the CFN-Lint CLI
Official source and documentation: Common installation methods (choose based on your environment):
Quick verification after install:
Tips for seamless integration
- If VS Code still shows CLI not found after installing, restart VS Code or your terminal so the PATH updates take effect.
- Use
cfn-lint --infoto display rule metadata and guidance for resolving issues. - Add CFN-Lint to CI pipelines (Docker or pip installation) to enforce template quality in PRs.
Next steps in this series
- Install Python on your platform (Windows, macOS, or Linux) if you haven’t already.
- Install the CFN-Lint CLI using the method that fits your environment.
- Restart VS Code and open a CloudFormation template — you should now see inline diagnostics from the extension.
- In the next lesson, we’ll configure rule sets, customize ignores, and add CFN-Lint checks to CI workflows.