Example of integrating API Gateway + Litestar using PDM (2.5+) for dependency management and AWS SAM for deployment.
See the AWS SAM template.yaml
to apply your customizations.
Contains production requirements.txt
automatically exported from pdm.lock
. Will be deployed to a lambda layer.
Contains shared code beetwen lambdas. It'll be available to all your lambda code locally too after running pdm install
. Also deployed as a lambda layer.
The lambdas code, one folder per lambda. Inspect the teams lambda for the boilerplate required.
Entrypoint to locally execute the Litestar app. A PDM script is available pdm run dev
or pdm dev
. You should add the per-lambda subroutes to this file.
- Clone this repo.
- Run
pdm install
. - Run locally with
pdm run dev
.
Run sam build
and sam deploy
and follow instructions.