Tracked
- NPM Downloads Last Month
- 5
- Issues
- 0
- Stars
- 0
- Forks
- 0
- Watchers
- 0
Register function names with AWS SSM Parameter Store
Requirements:
This plugin creates an SSM Parameter with your functions’ fully qualified Lambda Function names as values. The main motivation for this plugin is to remove the dependency that any client code would have on the AWS Stack, as the stack name is part of the fully qualified Lambda Function name. Using this plugin, it is easier to move functions between stacks with out less changes to client code and configuration.
One caveat is the fact that any IAM policies that are written for these functions will still need to be updated. In the case of Serverless configuration, if you use the built-in SSM Parameter resolution, then it might be as simple as just redeploying any client upstream services.
Install via npm in the root of your Serverless service:
npm install serverless-plugin-registry --save-dev
plugins
array in your Serverless serverless.yml
:plugins:
- serverless-plugin-registry
service: ServerlessPluginRegistry
provider:
stage: ${opt:stage, "Test"}
functions:
Hello:
handler: hello.js
This will produce an SSM Parameter with
service: ServerlessPluginRegistry
provider:
stage: ${opt:stage, "Test"}
custom:
registry:
baseName: /Registry/${self:provider.stage}
functions:
Hello:
handler: hello.js
This will produce an SSM Parameter with
service: ServerlessPluginRegistry
provider:
stage: ${opt:stage, "Test"}
functions:
Hello:
handler: hello.js
registry:
baseName: /Registry/${self:provider.stage}
This will produce an SSM Parameter with
service: ServerlessPluginRegistry
provider:
stage: ${opt:stage, "Test"}
functions:
Hello:
handler: hello.js
registry:
baseName: /Registry/${self:provider.stage}
HowAreYou:
handler: howAreYou.js
registry:
register: true
Goodbye:
handler: goodbye.js
This will only produce two SSM Parameters with
Value: ServerlessPluginRegistry-Test-Hello
Help us making this plugin better and future proof.
npm install
git checkout -b new_feature
npm run lint
This software is released under the MIT license. See the license file for more details.