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 = processenvFooBarconst barbaz = ` <= barbaz`
replaces
const foobar = 'somethingA'const barbaz = `somethingB <= barbaz`