serverless-ssm-seed

0.1.1 • Public • Published

This plugin will seed your AWS SSM Paramter Store with the environment you have defined in your serverless config. By default your .env will be used to populate the values;

More information about SSM environment variables: Server Variables from AWS SSM Parameter Store

Installation

npm i serverless-ssm-seed

Configuration

In your serverless.yml:

Define the plugin

plugins:
    - serverless-ssm-seed

Define the configuration

custom:
  ssm: 
    secure: ['SECURE_VAR']
    ignore: ['SOME_VAR']
    stages: ['dev', 'staging', 'production']

Define the ssm environment variables

  environment:
    SECURE_VAR: ${ssm:/${self:custom.stage}/SECURE_VAR~true}
    SOME_VAR: ${ssm:/${self:custom.stage}/SOME_VAR}

Usage

Seed using your .env values for the defaults:

sls ssm-seed

Use a string instead of .env values for the defaults:

sls ssm-seed --ssm-default='default'

Verify

  • Login to your AWS Console
  • Services -> Systems Manager
  • Parameter Store

You should now see your environment parameters.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    14
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    14

Package Sidebar

Install

npm i serverless-ssm-seed

Weekly Downloads

14

Version

0.1.1

License

MIT

Unpacked Size

6.28 kB

Total Files

4

Last publish

Collaborators

  • askedio