/iam-policies-cli

A CLI tool for building simple to complex IAM policies

Primary LanguageJavaScript

iam-policies-cli

CLI for generating AWS IAM policy documents, SAM policy templates or SAM Connectors 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

🎉 New in v1.0.5 - support for AWS::Serverless::Connectors

If you point a SAM template to this tool it will suggest connectable resources and let you generate the AWS::Serverless::Connector resource Demo

Installation

npm install -g @mhlabs/iam-policies-cli

Usage

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

Example

Demo