skillfed

cloudformation-cli

cloudformation-cli v0.2.39 94.4K downloads/30d#13,328 on PyPI335
Permissive license Apache License 2.0 Active released

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-cli

uv

uv add cloudformation-cli

poetry

poetry add cloudformation-cli

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Build ToolsTopic :: Software Development :: Code Generators

Tags

cloudformation resource provider developmentcfn cli toolaws resource type authoringcloudformation hook creationinfrastructure as code plugin system
aws-infrastructurecloudformationplugin-system

More Build Tools packages