GeezerVison is showing github.com — GitHub - Ricardo-VP/serverless-fastapi: Repo for https://www.deadbear.io/simple-serverless-fastapi-with-aws-lambda/ but this repo also includes terraform 🚀
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|
| | | |
| | | |
| | | |
| | | |
| | | |
|
Repository files navigation
Serverless + FastAPI (Mangum) + Terraform
Generate the lambda zip file (Unix/macOS) 🏗
- Init venv: "python3 -m virtualenv -p python3.8 env"
- Activate venv: "source ./env/bin/activate"
- Install dependencies: "python3 -m pip install -r requirements.txt"
- Create zip file with the venv packages: "cd env/lib/python3.8/site-packages && zip -r9 ../../../../lambda.zip ."
- Add app files to the zip: "cd ../../../../ && zip -g lambda.zip -r app"
- terraform init
- terraform plan # if all it's okay then go to the next step
- terraform apply