The goal is to demonstrate using the Python poetry tool to manage dependencies of an AWS Serverless project.
## Initialize project
poetry init --no-interaction
## Install dependencies, like aws-sam-cli
poetry install
## Initialize Lambda project
poetry run sam init \
--runtime python3.9 \
--dependency-manager pip \
--app-template hello-world \
--name sam-app \
--output-dir .
## Add a dependency
poetry add sqlalchemy
## Add a development utility
poetry add --dev mypy
## Export Serverless dependencies
poetry export --without-hashes > hello_world/requirements.txt
## Build AWS Serverless project
poetry run sam build --use-container