CDK.IAM.Floyd
0.850.0
dotnet add package CDK.IAM.Floyd --version 0.850.0
NuGet\Install-Package CDK.IAM.Floyd -Version 0.850.0
<PackageReference Include="CDK.IAM.Floyd" Version="0.850.0" />
<PackageVersion Include="CDK.IAM.Floyd" Version="0.850.0" />
<PackageReference Include="CDK.IAM.Floyd" />
paket add CDK.IAM.Floyd --version 0.850.0
#r "nuget: CDK.IAM.Floyd, 0.850.0"
#:package CDK.IAM.Floyd@0.850.0
#addin nuget:?package=CDK.IAM.Floyd&version=0.850.0
#tool nuget:?package=CDK.IAM.Floyd&version=0.850.0
IAM Floyd
AWS IAM policy statement generator with a fluent interface, for TypeScript, JavaScript, Python, Java, C# and Go.
IAM Floyd has a class for every AWS service, with a method for every action, resource type and condition key. Your IDE completes them and shows their documentation, so you neither look up action names and ARN formats, nor deploy policies with typos.
import { Statement } from 'iam-floyd';
const statement = new Statement.Ec2()
.allow()
.toStartInstances()
.toStopInstances()
.ifResourceTag('Owner', '${aws:username}');
{
"Condition": {
"StringLike": {
"ec2:ResourceTag/Owner": "${aws:username}"
}
},
"Action": ["ec2:StartInstances", "ec2:StopInstances"],
"Resource": "*",
"Effect": "Allow"
}
<details> <summary>Python</summary>
from iam_floyd import Statement
statement = (
Statement.Ec2()
.allow()
.to_start_instances()
.to_stop_instances()
.if_resource_tag('Owner', '${aws:username}')
)
</details><details> <summary>Java</summary>
import com.udondan.iamFloyd.statement.Ec2;
Ec2 statement = new Ec2()
.allow()
.toStartInstances()
.toStopInstances()
.ifResourceTag("Owner", "${aws:username}");
</details><details> <summary>C#</summary>
using Statement = IAM.Floyd.Statement;
var statement = new Statement.Ec2()
.Allow()
.ToStartInstances()
.ToStopInstances()
.IfResourceTag("Owner", "${aws:username}");
</details><details> <summary>Go</summary>
import (
"udondan.github.io/iam-floyd/go/iamfloyd"
"udondan.github.io/iam-floyd/go/iamfloyd/statement"
)
s := statement.NewEc2(nil).
Allow().
ToStartInstances().
ToStopInstances().
IfResourceTag(iamfloyd.String("Owner"), iamfloyd.String("${aws:username}"), nil)
</details>
Support for:
- 455 Services
- 22036 Actions
- 2329 Resource Types
- 2497 Condition keys
Features
- Complete: generated from the AWS documentation, and updated every week
- Access levels: add all actions of an access level, e.g.
allReadActions()orallWriteActions() - Regular expressions: add all actions that match a pattern with
allMatchingActions('/vpn/i') - Resources: build ARNs with a method per resource type, e.g.
onBucket('example-bucket'), with defaults for partition, region and account - Conditions: a method per condition key, with operators like
ForAnyValue:StringEqualsorIfExists - AWS CDK:
cdk-iam-floydstatements are aniam.PolicyStatementof the AWS CDK - Collections of common statements, and the names of all AWS managed policies
- Policy converter: turn an existing JSON policy into IAM Floyd code with the online converter
Packages
IAM Floyd comes in two variants, with the same API and the same version number in every language:
iam-floydcreates statements as JSON, for the AWS SDKs, CloudFormation, Terraform or anything else that takes an IAM policy. The packages have no dependencies. In Python, Java, C# and Go, they are native and do not need Node.js.cdk-iam-floydcreates statements of the AWS CDK v2. In Python, Java, C# and Go, they are built with jsii, like the AWS CDK itself, and need Node.js.
| Language | iam-floyd |
cdk-iam-floyd |
|---|---|---|
| TypeScript / JavaScript | ||
| Python | ||
| Java | ||
| C# / .NET | ||
| Go |
Installation
# TypeScript / JavaScript
npm install iam-floyd # or cdk-iam-floyd
# Python
pip install iam-floyd # or cdk-iam-floyd
# Java (Maven), with the version of the release
# com.udondan:iam-floyd # or com.udondan:cdk-iam-floyd
# C# / .NET
dotnet add package IAM.Floyd # or CDK.IAM.Floyd
# Go
go get udondan.github.io/iam-floyd/go/iamfloyd # or .../go/cdkiamfloyd
IAM Floyd has not reached 1.0.0 yet, and the API can still change between releases. Pin the exact version.
The requirements of each package and the compatibility with the AWS CDK are listed in the documentation.
Documentation
The documentation explains all features, with examples in every language.
Legal
The service models in the lib/generated/model folder, and the code generated from them, are derived from the AWS documentation. The class- and function-names and their description therefore are property of AWS.
AWS and their services are trademarks, registered trademarks or trade dress of AWS in the U.S. and/or other countries.
This project is not affiliated, funded, or in any way associated with AWS.
IAM Floyd is licensed under Apache License 2.0. Dependencies might be released under different licenses.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Amazon.CDK.Lib (>= 2.0.0 && < 3.0.0)
- Amazon.JSII.Runtime (>= 1.141.0 && < 2.0.0)
- Constructs (>= 10.0.0 && < 11.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on CDK.IAM.Floyd:
| Package | Downloads |
|---|---|
|
com.github.mmuller88.cdkProwler
An AWS CDK custom construct for deploying Prowler to you AWS Account. The following description about Prowler is taken from https://github.com/toniblyx/prowler: Prowler is a security tool to perform AWS security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness. It contains all CIS controls listed here https://d0.awsstatic.com/whitepapers/compliance/AWS_CIS_Foundations_Benchmark.pdf and more than 100 additional checks that help on GDPR, HIPAA … (Stability: Stable) |
|
|
CDK.SSM.Document
CDK Construct for managing SSM Documents (Stability: Stable) |
|
|
CDK.Athena
CDK Construct for creating Athena resources (Stability: Stable) |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.850.0 | 108 | 10/5/2026 |
| 0.849.0 | 89 | 10/4/2026 |
| 0.848.0 | 94 | 10/4/2026 |
| 0.847.0 | 105 | 10/3/2026 |
| 0.263.0 | 981 | 10/22/2021 |
| 0.262.0 | 654 | 10/21/2021 |
| 0.261.0 | 702 | 10/20/2021 |
| 0.260.0 | 743 | 10/15/2021 |
| 0.259.0 | 663 | 10/14/2021 |
| 0.258.0 | 682 | 10/13/2021 |
| 0.257.0 | 694 | 10/8/2021 |
| 0.256.0 | 729 | 10/7/2021 |
| 0.255.0 | 693 | 10/6/2021 |
| 0.254.0 | 642 | 10/5/2021 |
| 0.253.0 | 667 | 10/2/2021 |
| 0.252.0 | 600 | 10/1/2021 |
| 0.251.0 | 605 | 9/29/2021 |
| 0.250.0 | 651 | 9/28/2021 |
| 0.249.0 | 800 | 9/25/2021 |
| 0.248.0 | 676 | 9/24/2021 |
