Registry /
type-stubs / types-boto3-cloudformation
Install & Compatibility
Where this runs
tested against v1.43.62 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.3MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.2s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CloudFormationClient
✓ from types_boto3_cloudformation import CloudFormationClient
✗ from types_boto3_cloudformation import CloudFormationClient
This quickstart demonstrates how to obtain a typed CloudFormation client and use it to list stacks. The `TYPE_CHECKING` block ensures the type imports are only used during static analysis, avoiding a runtime dependency if desired. You must have AWS credentials configured for boto3 to function (e.g., via `~/.aws/credentials` or environment variables).
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from types_boto3_cloudformation.client import CloudFormationClient
from types_boto3_cloudformation.type_defs import StackSummaryTypeDef
# Create a boto3 client. Types are typically auto-discovered by IDEs/type checkers
# if types-boto3-cloudformation is installed.
client: CloudFormationClient = boto3.client("cloudformation")
try:
# Example: List CloudFormation stacks
response = client.list_stacks(StackStatusFilter=[
'CREATE_COMPLETE', 'UPDATE_COMPLETE', 'ROLLBACK_COMPLETE'
])
print("CloudFormation Stacks:")
for stack_summary: StackSummaryTypeDef in response.get("StackSummaries", []):
print(f" - {stack_summary['StackName']} ({stack_summary['StackStatus']})")
except Exception as e:
print(f"Error listing stacks: {e}")
# In a real application, handle specific AWS exceptions like ClientError
Debug
Known issues
breakingPython 3.8 support was removed with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade to Python 3.9 or newer to use `types-boto3-cloudformation` versions generated by this builder version or newer.fixUpgrade your Python environment to 3.9 or higher.
affects: mypy-boto3-builder >=8.12.0 (and corresponding types-boto3-cloudformation versions)
breakingType definition (TypeDef) naming conventions changed in `mypy-boto3-builder` 8.9.0. Specifically, packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).fixReview and update `TypeDef` import paths and names in your code to match the new conventions.
affects: mypy-boto3-builder >=8.9.0 (and corresponding types-boto3-cloudformation versions)
gotchaThis package provides *only* type annotations. The actual `boto3` library must be installed separately for your code to run at runtime. `types-boto3-cloudformation` does not include or replace the `boto3` runtime.fixEnsure `boto3` is installed in your project: `pip install boto3`.
affects: All versions
gotchaPyCharm users might experience slow performance or high CPU usage due to `Literal` overloads (issue PY-40997). The recommendation is to use `types-boto3-lite` versions or disable PyCharm's internal type checker and use `mypy` or `pyright` externally.fixConsider installing `types-boto3-lite-cloudformation` instead (`pip install types-boto3-lite-cloudformation`) or configure your PyCharm environment to use external type checkers.
affects: All versions (PyCharm specific)
gotchaWith the migration to PEP 561 packages in `mypy-boto3-builder` 8.12.0, while core import paths should remain stable, there's a potential for tooling that relied on non-standard stub discovery mechanisms to require updates or configuration adjustments.fixEnsure your static analysis tools (mypy, pyright) and IDEs are updated to their latest versions and configured to correctly discover PEP 561-compliant stub packages.
affects: mypy-boto3-builder >=8.12.0 (and corresponding types-boto3-cloudformation versions)
Upgrade
Version history
1.43.62latest on PyPI · released Jul 31, 2026
Audit
Dependencies
pythonrequiredRequired Python version.
boto3requiredThis package provides type hints for boto3. Boto3 itself must be installed separately to provide runtime functionality.