CLI for generating AWS IAM policy documents or SAM policy templates based on the JSON definition used in the AWS Policy Generator.
Provide an optional SAM or CloudFormation template and it will let you reference resource ARNs using intrinsic functions for defined resources.
The mapping of CloudFormation resource type -> the intrinsic function that returns the ARN is based on the cfn-lint schema for us-east-1
npm install -g @mhlabs/iam-policies-cli
Example: iam-pol -t template.yaml -f yaml
Options:
-v, --vers output the current version
-t, --template <filename> Template file name (default: "serverless.template")
-f, --format <JSON|YAML> Output format (default: "JSON")
-o, --output <console|clipboard> Template file namePolicy output (default: "console")
-h, --help output usage information