serverless-plugin-embedded-env-in-code

0.1.0 • Public • Published

ServerlessFramework Plugin

Embedded env in Code

This plugin will replace environment variables with static strings before deployment. It’s for Lambda@Edge.

Usage

serverless.yml

functions:
  foobar:
    handler: foobar.perform
    embedded:
      files:
        - foobar.js
        - foobar-lib.js
      variables:
        FooBar: somethingA
        BarBaz: somethingB

For example

const foobar = process.env.FooBar
const barbaz = `${process.env.BarBaz} <= barbaz`

replaces

const foobar = 'somethingA'
const barbaz = `somethingB <= barbaz`

Package Sidebar

Install

npm i serverless-plugin-embedded-env-in-code

Weekly Downloads

93

Version

0.1.0

License

MIT

Unpacked Size

2.78 kB

Total Files

3

Last publish

Collaborators

  • zaru