{{lambda-python-template.project-description}}
Based on lamba-python-template
=============================================
Please read docs/usage.md
Template Repo for AWS Lambda Images written in Python.
This template is a starting point for any newly created python lambda images.
This guide assumes installation within WSL2, using pyenv and Poetry. Although all of these are optional, they are recommended.
- Docker
- Python (3.10+)
- Terraform
Firstly, use this repo as a template on github then clone that repository
$ git clone https://github.com/zuto/my-lambda
$ cd my-lambda
$ poetry installThis setup allows local operation.
Functions should have unit tests (and also an example integration test) to ensure predictible responses; this is powered by pytest, running the test suite is simple
$ poetry install --dev
$ pytestAlso included in the dev dependencies is coverage and pytest-xdist allowing coverage reporting and distributed testing - generating a html report is very simple.
$ coverage run --source=app --module pytest --verbose . && coverage report --show-missing
$ coverage htmlThe first line generated a console report, and the second line generates a HTML version which can be found in the htmlcov directory.