https://github.com/serverless-plugins/serverless-kms-alias
Serverless plugin to expand a KMS alias variable to the ARN of the KMS key
https://github.com/serverless-plugins/serverless-kms-alias
hacktoberfest hacktoberfest2022 serverless serverless-framework
Last synced: 2 days ago
JSON representation
Serverless plugin to expand a KMS alias variable to the ARN of the KMS key
- Host: GitHub
- URL: https://github.com/serverless-plugins/serverless-kms-alias
- Owner: serverless-plugins
- License: mit
- Created: 2022-01-18T14:49:36.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-27T05:15:17.000Z (about 1 month ago)
- Last Synced: 2026-02-27T07:57:15.996Z (about 1 month ago)
- Topics: hacktoberfest, hacktoberfest2022, serverless, serverless-framework
- Language: TypeScript
- Homepage:
- Size: 1.56 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# serverless-kms-alias
[](https://npmjs.org/package/serverless-kms-alias)
[](https://nodejs.org)
Serverless plugin to expand a KMS alias variable to the ARN of the KMS key
## Usage
`${kms:}` will expand to the ARN of the kms key. The variable can be used anywhere that other Serverless
variables are resolved.
### Example - Provider kmsKeyArn
```yaml
service: foo
provider:
name: aws
kmsKeyArn: '${kms:alias/aws/lambda}'
runtime: nodejs20.x
plugins:
- serverless-kms-alias
functions:
foo:
handler: foo.handler
```
### Example - Function kmsKeyArn
```yaml
service: foo
provider:
name: aws
runtime: nodejs20.x
plugins:
- serverless-kms-alias
functions:
foo:
handler: foo.handler
kmsKeyArn: '${kms:arn:aws:kms:${aws:region}:${aws:accountId}:alias/aws/lambda}'
```
### Example - Disable the plugin
```yaml
service: foo
provider:
name: aws
runtime: nodejs20.x
plugins:
- serverless-kms-alias
custom:
kmsAlias:
enabled: false
functions:
foo:
handler: foo.handler
kmsKeyArn: '${kms:arn:aws:kms:${aws:region}:${aws:accountId}:alias/aws/lambda}'
```