1.3.5 ā€¢ Published 11 months ago

serverless-package-external v1.3.5

Weekly downloads
9,028
License
MIT
Repository
github
Last release
11 months ago

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.

1.3.5

11 months ago

1.3.4

3 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago