https://github.com/kaicoh/serverless-assume-role
A Serverless framework plugin to enable AWS assume role
https://github.com/kaicoh/serverless-assume-role
aws aws-sts serverless serverless-framework
Last synced: 6 months ago
JSON representation
A Serverless framework plugin to enable AWS assume role
- Host: GitHub
- URL: https://github.com/kaicoh/serverless-assume-role
- Owner: kaicoh
- License: mit
- Created: 2022-12-02T12:06:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T23:47:58.000Z (over 2 years ago)
- Last Synced: 2025-03-07T13:05:23.584Z (7 months ago)
- Topics: aws, aws-sts, serverless, serverless-framework
- Language: TypeScript
- Homepage:
- Size: 628 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# serverless-assume-role
[](http://www.serverless.com)
[](https://github.com/kaicoh/serverless-assume-role/actions)
[](https://coveralls.io/github/kaicoh/serverless-assume-role?branch=main)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-rolecustom:
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](LICENSE).