serverless mangum examples

Example ASGI applications and Serverless Framework configurations using Mangum

26
2
Python

serverless-mangum-examples

Example ASGI applications and Serverless Framework configurations using Mangum.

There are examples for the following ASGI-compatible frameworks:

The examples are all intended to be basic starting points for deploying an ASGI application to AWS Lambda & API Gateway. Things like database support will require more advanced configurations.

Requirements

  • Python 3 (minimum version depending on application framework)
  • Serverless Framework (a version that includes HTTP API support)
  • Docker
  • npm

Setup

Serverless Framework

npm install -g [email protected]

Serverless Framework plugins

serverless-python-requirements

sls plugin install -n serverless-python-requirements

GitHub

serverless-dotenv-plugin

npm i -D serverless-dotenv-plugin

GitHub

TODO (maybe)

  • Database examples
  • WebSocket examples. WebSocket support in Mangum is currently “experimental” (ie: it might be broken).