Home

Awesome

<h1 align="center" style="border-bottom: none;"> serverless-iam-helper</h1> <h3 align="center">Helps apply IAM Path and PermissionsBoundary properties, especially for hard to reach roles.</h3> <p align="center"> <a href="https://github.com/stratiformdigital/serverless-iam-helper/releases/latest"> <img alt="latest release" src="https://img.shields.io/github/release/stratiformdigital/serverless-iam-helper.svg"> </a> <a href="https://www.npmjs.com/package/@stratiformdigital/serverless-iam-helper"> <img alt="npm latest version" src="https://img.shields.io/npm/v/@stratiformdigital/serverless-iam-helper/latest.svg"> </a> <a href="https://codeclimate.com/github/stratiformdigital/serverless-iam-helper/maintainability"> <img alt="Maintainability" src="https://api.codeclimate.com/v1/badges/4f7c73b0294226a0414d/maintainability"> </a> <a href="https://github.com/semantic-release/semantic-release"> <img alt="semantic-release: angular" src="https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release"> </a> <a href="https://dependabot.com/"> <img alt="Dependabot" src="https://badgen.net/badge/Dependabot/enabled/green?icon=dependabot"> </a> <a href="https://github.com/prettier/prettier"> <img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"> </a> </p>

Usage

...

plugins:
  - serverless-iam-helper

...

# Note:  This is standard aws provider configuration; this plugin makes use of it.
provider:
  iam:
    role:
      path: /my/custom/path
      permissionsBoundary: arn:aws:iam::000000000000:policy/my/custom-boundary-policy

Background

This plugin intends to help apply IAM Path and PermissionsBoundary properties to hard to reach IAM roles, but conditionally applies to all.

While the Serverless Framework supports path/permboundary specification at the provider level, that capability seems to only affect roles generated for user defined functions. Some serverless deployments generate roles outside of user defined functions, sometimes in user defined cloudformation and sometimes behind the scenes of certain plugins/functionality, so this plugin helps reach those.
Scenarios where this should help:

Notes on logic:

License

License: MIT

See LICENSE for full details.