@joblocal/serverless-invoke-local-environment

1.1.0 • Public • Published

Serverless Invoke Local Environment Plugin

This serverless plugin allows you to overwrite a functions process.env when invoking locally, allowing you to simulate AWS services using docker and connect to those containers for an easier development workflow.

Installation

Using yarn:

$ yarn add --dev @joblocal/serverless-invoke-local-environment

Using npm:

$ npm install --save-dev @joblocal/serverless-invoke-local-environment

Usage

After installation you can configure the plugin like so:

# serverless.yml

plugins:
  - '@joblocal/serverless-invoke-local-environment'

custom:
  invokeLocalEnvironment: ${file(.env)}
# .env
ENVIRONMENT_VARIABLE=value

.env (compatible with dotenv)

After configuration, whenever you invoke your lambda function

$ serverless invoke local -f functionName

your .env will be accessible via process.env.

Built with

  • Yarn - Dependency Management
  • Jest - Test Runner
  • and

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and feature requests.

Authors

  • Joblocal GmbH - Initial work - Joblocal

See also the list of contributors who participated in this project.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    4
  • 1.0.2
    4
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @joblocal/serverless-invoke-local-environment

Weekly Downloads

8

Version

1.1.0

License

MIT

Unpacked Size

8.02 kB

Total Files

9

Last publish

Collaborators

  • jlprodent
  • timm.w
  • raphaeldidjurgeit
  • bastianhofmann