npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

serverless-package-external

1.1.1 • Public • Published

serverless-package-external 📦

serverless semantic-release npm version Build Status

Deploy a Serverless Python Function services with external code

Before deploying, this plugin symlinks folders containing shared code into the root directory of your Serverless function. This plugin works also with serverless-offline plugin.

Installation

npm i serverless-package-external --save-dev

Usage

service: service-name
 
plugins:
  - serverless-package-external
 
functions:
  # Your functions here
 
custom:
  packageExternal:
    external:
      - '../common'
      - '../service-a/module'

Example Directory Structure

└── common
    └── resource.py
└── service-a
    └── handler.py
    └── serverless.yml
    └── module
        └── main.py
└── service-b
    └── handler.py
    └── serverless.yml

In handler.py, external code can be imported:

from common.resource import shared_resource

Licensing

serverless-package-external is licensed under the MIT License.

It is originally based on serverless-package-common.

install

npm i serverless-package-external

Downloadsweekly downloads

594

version

1.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability