Serverless Flask

Example of running python Flask app on Lambda + API Gateway via serverless framework. Based on Build a Python REST API with Serverless, Lambda, and DynamoDB.

Architecture

Prerequisites

Running

# ensure python venv loaded in shell
pipenv shell

# install npm deps for serverless
npm install

# run flash app locally.  server reloads on file change.  still need to refresh page in browser
npm run dev

# deploy. (docker must be running to build python packages for linux target / lambda)
npm run deploy

Resources