serverless-sthree-env

1.0.1 • Public • Published

STHEREE ENV PLUGIN

This plugin is used to get config from a json formatted file in S3 and copy them to environment variable

HOW TO USE

  • just include 'serverless-sthree-env' plugin to your serverless yml file

For now it is quite simple, the bucket and config key name is predefined based on

Bucket: (service name)-config-(stage) Key: config.json

everything in that key will be copied over to your environment variable

eg. service name is my-apps and I am using dev stage

so create a bucket in the same region with the name my-apps-config-dev and config.json file inside there like below

{
  "KEY": "VALUE" 
}

FUTURE IMPROVEMENT

  • Create serverless command to create a config bucket
  • Allow selection of config bucket and key
  • Whitelist or blacklist env variable to be copied

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i serverless-sthree-env

    Weekly Downloads

    5

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    6.78 kB

    Total Files

    7

    Last publish

    Collaborators

    • styletributeit