This package has been deprecated

Author message:

This package is no longer being maintained.

serverless-plugin-jsonenv

1.1.0-rc.1 • Public • Published

Serverless JSON Environment Plugin

serverless npm version npm downloads license

Merge a JSON file with your provider or functions environment objects.

Requirements:

  • Serverless v1.12.x or higher.
  • AWS provider

How it works

JSON Environment plugin will parse and merge with your environment objects whatever JSON string you pass. This plugin is useful to use with the new S3 variables syntax avoiding the hassle to add individually all environment Key/Value to S3.

Setup

Install via npm in the root of your Serverless service:

npm install serverless-plugin-jsonenv --save-dev
  • Add the plugin to the plugins array in your Serverless serverless.yml:
plugins:
  - serverless-plugin-jsonenv
  • Add environmentJSON: ${s3:myBucket/myEnvironment.json} property to provider or function:
provider:
  environmentJSON: ${s3:myBucket/providerEnvironment.json}
functions:
  hello:
    environmentJSON: ${s3:myBucket/helloEnvironment.json}
  • All done! JSON Environment will run on SLS deploy and invoke local commands

Contribute

Help us making this plugin better and future proof.

  • Clone the code
  • Install the dependencies with npm install
  • Create a feature branch git checkout -b new_feature
  • Lint with standard npm run lint

License

This software is released under the MIT license. See the license file for more details.

Package Sidebar

Install

npm i serverless-plugin-jsonenv

Weekly Downloads

112

Version

1.1.0-rc.1

License

MIT

Last publish

Collaborators

  • hugomcfonseca
  • hmrbarros
  • fidel-api