Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.23 KB

collections.rst

File metadata and controls

46 lines (28 loc) · 1.23 KB

Collections

Note

The list of collections is not exhaustive. If you have a list of statements that you think is worth sharing with others, please open an issue or a pull request.

IAM Floyd provides commonly used statement collections.

First import the Collection provider:

ts

// for use without AWS CDK use the iam-floyd package import { Collection } from 'iam-floyd';

// for use with CDK use the cdk-iam-floyd package import { Collection } from 'cdk-iam-floyd';

js

// for use without AWS CDK use the iam-floyd package const { Collection } = require('iam-floyd');

// for use with CDK use the cdk-iam-floyd package const { Collection } = require('cdk-iam-floyd');

Collections then can be called via:

collection

Collections return a list of statements, which then can be used in a policy like this:

collection-policy

Available collections

allowEc2InstanceDeleteByOwner

Allows stopping EC2 instance for the user who started them.