Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ljacobsson/iam-policies-cli
A CLI tool for building simple to complex IAM policies
https://github.com/ljacobsson/iam-policies-cli
aws-tools iam
Last synced: 26 days ago
JSON representation
A CLI tool for building simple to complex IAM policies
- Host: GitHub
- URL: https://github.com/ljacobsson/iam-policies-cli
- Owner: ljacobsson
- Created: 2020-02-21T15:36:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T21:19:49.000Z (7 months ago)
- Last Synced: 2024-05-01T12:52:52.409Z (about 2 months ago)
- Topics: aws-tools, iam
- Language: JavaScript
- Homepage:
- Size: 3.9 MB
- Stars: 68
- Watchers: 7
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Lists
- awesome-stars - ljacobsson/iam-policies-cli - A CLI tool for building simple to complex IAM policies (JavaScript)
README
## iam-policies-cli
CLI for generating AWS IAM policy documents, SAM policy templates or [SAM Connectors](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/managing-permissions-connectors.html) based on the [JSON definition](https://awspolicygen.s3.amazonaws.com/js/policies.js) used in the [AWS Policy Generator](https://awspolicygen.s3.amazonaws.com/policygen.html).
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](https://github.com/aws-cloudformation/cfn-python-lint/blob/master/src/cfnlint/data/CloudSpecs/us-east-1.json)
### :tada: 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](https://github.com/mhlabs/iam-policies-cli/blob/master/images/demo-connectors.gif?raw=true)## 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 Template file name (default: "serverless.template")
-f, --format Output format (default: "JSON")
-o, --output Template file namePolicy output (default: "console")
-h, --help output usage information
```## Example
![Demo](https://github.com/mhlabs/iam-policies-cli/blob/master/demo.gif?raw=true)