AWS Lambda template to use with Python
- Python ~3.9 (latest version supported by AWS Lambda)
- Poetry (local dependency to package management)
- Serverless Framework (local dependency to run locally)
- Install Poetry
- Install Serverless Framework
- Install serverless plugins
serverless plugin install -n serverless-offline
- Create a virtual environment with Python 3.9 and activate it
python3.9 -m venv .env
source .env/bin/activate
- Install the project dependencies with the local test packages
poetry install --with dev
This project uses Serverless Framework to run locally.
sls offline start --verbose
source .env/bin/activate
pytest tests/