skillfed

cdk-iam-floyd

AWS IAM policy statement generator with fluent interface for AWS CDK

cdk-iam-floyd v0.507.0 98.2K downloads/30d#13,099 on PyPI573
Permissive license Apache-2.0 Active released

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

uv

uv add cdk-iam-floyd

poetry

poetry add cdk-iam-floyd

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: OS IndependentProgramming Language :: JavaScriptProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed

Tags

AWS IAM policy generatorCDK IAM policy builderfluent IAM statementAWS policy as codeCDK policy construction
aws-cdkiam-policyinfrastructure-as-code

More Build Tools packages