Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-plugin-jsonenv

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-jsonenv

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

  • 1.1.0-rc.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65
decreased by-67.17%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 11 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc