Install Python.
Install dependencies:
pip install -r app.requirements.txt -r dev.requirements.txt
Install test dependencies:
pip install -r tests/requirements.txt
Run tests:
pytest
Format Python code:
black .
isort .
Format Terraform code:
cd terraform
terraform fmt
Run pip-tools compile:
pip-compile
Should be run with the same version of Python as the Lambda function's runtime
(currently 3.12), eg python3.12 -m piptools compile
.
Then remove Lambda runtime-provided packages from
app.requirements.txt: urllib3
, six
, jmespath
,
python-dateutil
, botocore
, s3transfer
, boto3
.