cdk-iam-floyd
AWS IAM policy statement generator with fluent interface for AWS CDK
What it is and what it does
cdk-iam-floyd is a Python wrapper around AWS IAM policy statement generation, designed to integrate directly into AWS CDK constructs. It provides a fluent, type-safe interface to build IAM policies by chaining method calls rather than hand-writing JSON—for example, calling `.allow().describe_instances()` on an EC2 service object generates the corresponding policy statement. The package maintains coverage of 353 AWS services with their associated actions, resource types, and condition keys, all generated from AWS documentation.
The package depends on aws-cdk-lib, constructs, jsii, publication, and typeguard to bridge Python and CDK's JavaScript runtime and provide type safety. It is marked as Beta and has not reached 1.0.0, meaning the API may change; the maintainer recommends pinning to an exact version. The project is actively maintained with recent commits and is used by a significant portion of the PyPI ecosystem.
Use it for:
- Build least-privilege IAM policies in CDK stacks using method chaining instead of hand-written JSON.
- Generate policy statements for multiple AWS services with autocomplete and type hints in Python IDEs.
- Ensure policy syntax correctness by leveraging the fluent interface to catch errors at development time.
- Manage condition keys and resource types programmatically for complex multi-service policies.
- Integrate IAM policy generation into infrastructure-as-code pipelines without context switching to JSON.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates AWS IAM policy statements with a fluent interface, integrating into AWS CDK to simplify policy construction for 353 services, 14236 actions, 1504 resource types, and 1493 condition keys.
Yes, if you use AWS CDK and want to reduce IAM policy boilerplate. The package has low install friction, active maintenance, and permissive licensing. Pin to version 0.507.0 or later and verify CDK compatibility (>= 2.30.0); accept that the API is still Beta and may change before 1.0.0. No known vulnerabilities.
Install
cdk-iam-floyd on PyPI
pip
pip install cdk-iam-floyduv
uv add cdk-iam-floydpoetry
poetry add cdk-iam-floydInstalling cdk-iam-floyd
Before you install
Low install friction with a pure-Python wheel and five runtime dependencies. Actively maintained with recent commits; marked Beta but in use across the top 15000 PyPI packages.
License in practice
Apache-2.0 permissive license; dependencies bundled under MIT (regex-parser, common-substrings) and other licenses—review dependency licenses if redistribution is planned.
Quickstart
pip install cdk-iam-floyd
from cdk_iam_floyd import iam
statement = iam.Ec2().allow().describe_instances().build()
Requires AWS CDK v2.0.0 or later; version 0.507.0 requires CDK >= 2.30.0 per the compatibility matrix.
Verify before relying
- Whether the package's Beta status (Development Status :: 4) impacts production readiness for your use case.
- Exact CDK version compatibility for version 0.507.0 beyond the stated >= 2.30.0 threshold.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (~=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — aws-cdk-lib, constructs, jsii, publication, typeguard |
| Maintenance | actively maintained — 1,220 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,182/month — #13,099 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cdk_iam_floyd-0.507.0-py3-none-any.whl
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
aws-cdk.aws-iamProvides Python constructs for defining AWS IAM…
permissive · top 15,000 on PyPI
policyuniverseParses and analyzes AWS IAM and Resource…
permissive · top 15,000 on PyPI
aws-cdk.aws-kmsProvides AWS CDK constructs for defining and…
permissive · top 15,000 on PyPI
awacsawacs generates AWS IAM policy JSON from Python…
permissive · top 15,000 on PyPI
iamdataProvides programmatic access to AWS IAM service…
permissive · top 15,000 on PyPI
aws-cdk.aws-logsProvides AWS CDK constructs for creating and…
permissive · top 15,000 on PyPI
aws-cdk.aws-neptune-alphaProvides AWS CDK constructs for defining and…
permissive · top 15,000 on PyPI
cdk-cloudformation-datadog-monitors-monitorProvides an AWS CDK L1 construct for defining…
permissive · top 15,000 on PyPI
aws-cdk.cx-apiProvides the cloud executable protocol and…
permissive · top 15,000 on PyPI
aws-cdk.aws-ecrProvides AWS CDK constructs for defining,…
permissive · top 15,000 on PyPI