:zap: serverless-ssm-publish
Publish custom data to AWS SSM Parameter Store from serverless.yaml or Cloud Formation Output
Install
- Install with your choice of npm/yarn
npm install serverless-ssm-publish --save-dev
yarn add serverless-ssm-publish --save-dev
- Add the plugin to your
plugins
section in the serverless.yaml
plugins:
- serverless-ssm-publish
Usage
During deployment
Add any params you want published to SSM to your serverless.yaml custom section.
You can use source
to give the name of a Cloud Formation Output value you want published to SSM.
Ssm publish compares existing values and will only write if no value exists/ the value has changed.
resources:
Outputs:
ExampleStaticValue:
Value: example-static-value
Export:
Name: 'service-staticValue'
Description: initial description
custom:
secretToken: ${opt:secretToken}
ssmPublish:
enabled: true
params:
- path: /global/tokens/secretToken
value: ${self:custom.secretToken}
description: Super Secret Token
secure: true
- path: /service/config/storageBucket
source: ExampleStaticValue
secure: false
From the CLI
You can also call the plugin directly in order to update SSM params without running deployment/packaging.
sls ssmPublish
Version History
*0.1.0