Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sc5/serverless-sts-caller-id
Serverless plugin to get the user ID belonging to the current AWS credentials using STS (Security Token Service)
https://github.com/sc5/serverless-sts-caller-id
Last synced: 8 days ago
JSON representation
Serverless plugin to get the user ID belonging to the current AWS credentials using STS (Security Token Service)
- Host: GitHub
- URL: https://github.com/sc5/serverless-sts-caller-id
- Owner: SC5
- License: mit
- Created: 2018-03-27T14:04:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T07:59:49.000Z (over 6 years ago)
- Last Synced: 2024-11-06T08:46:05.203Z (11 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Serverless STS Caller ID
A Serverless Plugin for the [Serverless Framework](http://www.serverless.com) which
helps allows to retrieve the user ID belonging to the AWS credentials currently being used with the help of STS (Security Token Service).## Introduction
This plugins does the following:
* It provides a variable (`stsCallerId`) that contains the user ID of the AWS credentials being used
## Installation and configuration
In your service root, run:
```bash
npm install --save-dev serverless-sts-caller-id
```Add the plugin to `serverless.yml`:
```yml
plugins:
- serverless-sts-caller-id
```## Usage
You can use the custom variable `stsCallerId` in `serverless.yml`. For example:
```yml
provider:
stage: ${stsCallerId}
```If you want to get a SHA1 hashed version of the ID, you can use `stsCallerId:hashed`:
```yml
provider:
stage: ${stsCallerId:hashed}
```You can also truncate the hash to a specific length:
```yml
provider:
stage: ${stsCallerId:hashed:8}
```## TODO
* Add tests
## Release History
* 2018/03/27 - v1.0.0 - Initial version
## License
Copyright (c) 2018 [Nordcloud](https://nordcloud.com/), licensed for users and contributors under MIT license.
https://github.com/SC5/serverless-sts-caller-id/blob/master/LICENSE