cloudformation-cli
What it is and what it does
The CloudFormation CLI is a command-line tool that lets you develop and register custom AWS CloudFormation resource providers, hooks, and modules. It provides a project scaffolding system (init), code generation (generate), local contract testing (test), validation (validate), and submission workflows (submit, package) to register your custom types with CloudFormation. The tool integrates with language-specific plugins and AWS services via boto3 and botocore, and uses pytest for running contract tests against your resource handlers.
You use it to author custom CloudFormation resources in Java, Go, Python, or TypeScript, then test them locally and submit them for registration in your AWS account. It handles schema validation, handler packaging, and integration with CloudFormation's type registry. The tool is actively maintained, supports current Python versions (3.8–3.11), and is widely used within AWS infrastructure-as-code workflows.
Use it for:
- Develop a custom AWS resource type in Java or Python to manage proprietary infrastructure not covered by native CloudFormation resources.
- Author a CloudFormation hook to enforce compliance policies (e.g., tagging, encryption) across all stack deployments in your organization.
- Create a CloudFormation module to package and reuse common infrastructure patterns as a single deployable unit.
- Run contract tests locally against your resource handler before submitting it to CloudFormation's type registry.
- Validate and package a resource provider schema for distribution or internal use without immediately registering it.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A command-line tool for authoring and managing AWS CloudFormation resource providers, hooks, and modules that integrate with CloudFormation deployments.
Yes. The CloudFormation CLI is production-stable, actively maintained, and essential if you develop custom CloudFormation resource types, hooks, or modules. Low install friction and permissive licensing make it a straightforward addition to AWS infrastructure-as-code workflows. Install it if you need to extend CloudFormation beyond built-in resources; skip it if you only use standard CloudFormation types.
Install
cloudformation-cli on PyPI
pip
pip install cloudformation-cliuv
uv add cloudformation-clipoetry
poetry add cloudformation-cliInstalling cloudformation-cli
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent commits as of 2026-07-10 and production-stable status. Requires 19 runtime dependencies including boto3, pytest, docker, and cfn-lint, which adds some weight but are standard AWS and testing tools.
License in practice
Apache License 2.0 (permissive) allows use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install cloudformation-cli
cfn init
cfn generate
cfn test
cfn submit
Requires Python 3.6 or later. Language plugins (Java, Go, Python, TypeScript) must be installed separately for resource and hook type development. Optional: pyjq for propertyTransform schema support (not available on Windows).
Verify before relying
- Whether all 19 runtime dependencies are truly required for basic CLI usage or if some are optional for specific commands.
- Performance characteristics and typical execution time for test and submit workflows on real projects.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 19 — boto3, Jinja2, markupsafe, jsonpatch, jsonschema, pytest, pytest-random-order, pytest-localserver, Werkzeug, PyYAML, requests, hypothesis, colorama, docker, ordered-set, cfn-lint, cfn-flip, nested-lookup, botocore |
| Maintenance | actively maintained — 501 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 94,428/month — #13,328 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cloudformation_cli-0.2.39-py3-none-any.whl
Keywords: Amazon, Web, Services, AWS, CloudFormation
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
crhelperSimplifies writing CloudFormation custom…
permissive · top 15,000 on PyPI
cfnresponseSends response objects to AWS CloudFormation…
permissive · top 15,000 on PyPI
aws-cdk.custom-resourcesProvides a framework for implementing AWS…
permissive · top 15,000 on PyPI
cfn-flipConverts AWS CloudFormation templates between…
permissive · top 5,000 on PyPI
aws-cdk.aws-cloudformationDefines AWS CloudFormation resources…
permissive · top 15,000 on PyPI
awslabs.aws-iac-mcp-serverProvides an MCP server that validates…
permissive · top 15,000 on PyPI
aws-sam-translatorTransforms AWS Serverless Application Model…
permissive · top 1,000 on PyPI
cdk-cloudformation-datadog-monitors-monitorProvides an AWS CDK L1 construct for defining…
permissive · top 15,000 on PyPI
sceptreSceptre automates AWS CloudFormation stack…
permissive · top 15,000 on PyPI