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
Allows stopping EC2 instance for the user who started them.