serverless-assume-role

0.2.3 • Public • Published

serverless-assume-role

Serverless main Coverage Status

A Serverless framework plugin to enable AWS assume role.

Installation

Run this command.

$ npm install --save-dev serverless-assume-role

And add the following to your serverless.yml file

plugins:
  - serverless-assume-role

custom:
  assumeRole:
    stages:
      # The stages this plugin executes Assume Role action.
      - stg
      - prod
    params:
      # These are all the same parameter to what AWS API uses.
      # But the parameter names are all camelCased.
      # If you want more details for each parameter, see AWS Documentation.
      # https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html
      roleArn: arn:aws:iam::012345678901:role/your-role-name
      externalId: my-external-id
      roleSessionName: serverless-framework-deployment

It's done! Now when you run serverless deploy --stage stg or serverless deploy --stage prod, this plugin executes AssumeRole action before the deployment and then deploys your package with the IAM Role.

License

This software is released under the MIT License.

Package Sidebar

Install

npm i serverless-assume-role

Weekly Downloads

43

Version

0.2.3

License

MIT

Unpacked Size

22.2 kB

Total Files

5

Last publish

Collaborators

  • kaicoh