IAM.Floyd 0.855.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package IAM.Floyd --version 0.855.0
                    
NuGet\Install-Package IAM.Floyd -Version 0.855.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IAM.Floyd" Version="0.855.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IAM.Floyd" Version="0.855.0" />
                    
Directory.Packages.props
<PackageReference Include="IAM.Floyd" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IAM.Floyd --version 0.855.0
                    
#r "nuget: IAM.Floyd, 0.855.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IAM.Floyd@0.855.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IAM.Floyd&version=0.855.0
                    
Install as a Cake Addin
#tool nuget:?package=IAM.Floyd&version=0.855.0
                    
Install as a Cake Tool

IAM Floyd

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/udondan/iam-floyd/main/docs/header-dark.webp"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/udondan/iam-floyd/main/docs/header-light.webp"> <img alt="IAM Floyd: Build AWS IAM policies fluently." src="https://raw.githubusercontent.com/udondan/iam-floyd/main/docs/header-light.webp"> </picture>

Release Documentation Construct Hub codecov Maintainability License

Unofficial community project. Not affiliated with, endorsed or authorized by Amazon Web Services (AWS).

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.

using Statement = IAM.Floyd.Statement;

var 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"
}

Support for:

  • 464 Services
  • 23049 Actions
  • 2421 Resource Types
  • 2584 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() or allWriteActions()
  • 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:StringEquals or IfExists
  • AWS CDK: cdk-iam-floyd statements are an iam.PolicyStatement of the AWS CDK, and the on*() methods take constructs, e.g. onBucket(bucket)
  • Policies: a policy document that knows the maximum size of its type, validates its estimated size and splits itself into several policies
  • 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-floyd creates 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-floyd creates 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 npm npm
Python PyPI PyPI
Java Maven Central Maven Central
C# / .NET NuGet NuGet
Go Go Go

Installation

dotnet add package IAM.Floyd

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.

Auto completion demo

License

IAM Floyd is licensed under Apache License 2.0. Dependencies might be released under different licenses.

Disclaimer

This is an unofficial, independent open-source project and is not affiliated with, funded or endorsed by Amazon Web Services, Inc. or its affiliates. AWS and the names of its services are trademarks, registered trademarks or trade dress of AWS in the U.S. and/or other countries. The names are used only to describe compatibility.

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.

Use at your own risk. IAM Floyd generates policy statements but does not check what they allow, so review them before you deploy them.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on IAM.Floyd:

Package Downloads
CDK.Athena.WorkGroup

CDK Construct for creating Athena WorkGroups (Stability: Stable)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.856.0 140 11/30/2026
0.855.0 154 11/23/2026
0.854.0 160 11/16/2026
0.853.0 199 11/9/2026
0.852.0 212 11/2/2026
0.851.0 186 10/26/2026
0.850.0 152 10/5/2026
0.849.0 139 10/4/2026
0.263.0 1,323 10/22/2021
0.262.0 731 10/21/2021
0.261.0 737 10/20/2021
0.260.0 780 10/15/2021
0.259.0 693 10/14/2021
0.258.0 740 10/13/2021
0.257.0 758 10/8/2021
0.256.0 816 10/7/2021
0.255.0 775 10/6/2021
0.254.0 724 10/5/2021
0.253.0 739 10/2/2021
0.252.0 705 10/1/2021
Loading failed