0.1.0 • Published 1 year ago

serverless-seda v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

SEDA serverless

Installation

sls plugin install -n serverless-seda

Add the plugin to your serverless.yml file:

plugins:
  - serverless-seda

Add seda property at the function level:

functions:
  app:
    handler: main.seda
    seda: true

Example

serverless.yml

frameworkVersion: '3'
service: example

provider:
  name: aws
  runtime: python3.9

functions:
  app:
    handler: main.seda
    seda: true

plugins:
  - serverless-seda

main.py:

from seda import Seda

seda = Seda()

Deploy

SEDA deployment is triggered using the event hook after:deploy:deploy:

sls deploy

...and removed using the hook before:remove:remove:

sls remove

Use sls seda deploy|remove commands to manage SEDA resources without updating the service stack:

sls seda deploy

Remote Function Invocation

Run shell commands:

sls shell -f app --cmd env

Invoke Python interpreter:

sls python -f app --cmd 'import sys;print(sys.version)'