serverless-offline-aws-ssm-local
v1.1.3
Published
Serverless Offline SSM Provider for invoke local
Downloads
276
Readme
This is a "clone" of a 404 Repo for https://www.npmjs.com/package/serverless-offline-aws-ssm by @foo4u
Serverless Offline SSM Parameter Provider
Serverless plugin to resolves SSM paramters (variables) from a local file to support Serverless offline development.
This is to be used for local (DEV) testing while running Serverless Invoke Local!
Usage
Install the Plugin
npm i --save-dev serverless-offline-aws-ssm-localor
yarn add -D serverless-offline-aws-ssm-localAdd to Serverless
Add the serverless-offline-aws-ssm-local:
plugins:
- serverless-offline-aws-ssm-localDefine your SSM Parameter Values
This plugin loads SSM parameter values for offline use from a file named
offline.yml. This file should exist in the same directory as your
serverless.yml.
Parameters are declared in the same way as they're referenced in your
serverless.yml file, minus the ssm: prefix.
For example:
provider:
name: aws
environment:
REDIS_ENDPOINT: ${ssm:/my-service/foo/redis-endpoint}
SUPER_SECRET: ${ssm:/path/to/secureparam~true}Your offline.yml file should contain:
ssm:
/my-service/foo/redis-endpoint: some-value
/path/to/secureparam: other-valueInvoke local
When running your Lambda add the --offline argument, e.g.:
sls invoke local --function routes --path ../samples/routes.test.json --offline
