Skip to content

epsagon/serverless-package-external

Folders and files

NameName
Last commit message
Last commit date

Latest commit

90a4320 Β· Jun 28, 2023

History

33 Commits
Apr 28, 2020
Jun 25, 2019
Dec 23, 2018
Feb 4, 2020
Dec 23, 2018
Aug 5, 2018
May 4, 2020
Jun 28, 2023
Apr 12, 2021
Sep 8, 2020
Dec 23, 2018

Repository files navigation

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.