chalice
chalice copied to clipboard
Allow using poetry as a dependency management tool as well as pip / requirements.txt (as lambdas support this in the cdk now)
Lambdas support using poetry in the cdk now. https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-python-readme.html
It would be really nice if the chalice cdk deployment had a way of allowing this too.
Would this involve an alternative packager? Or is there a cdk only solution?
Fwiw I end up doing poetry export for chalice in my poetry projects
@kapilt - same, but it's not the same as it doesn't actually use pip, just parses the pip file, so some of the features don't work for example the local development mode local-project = {path = "../../data_models", develop=true}
This would be awesome!
Any planned support for this?
Waiting for this feature !
Fwiw I end up doing poetry export for chalice in my poetry projects
@kapilt @mcsheehan Could you give a step by step of this workflow?
Do you simply issue poetry export -f requirements.txt
or poetry export --without-hashes --format=requirements.txt > requirements.txt
prior to doing the Chalice deployment?
@Insighttful yeah you've got it. The CI pipeline is pretty much poetry export, then chalice package, then cloudformation deploy of it.
poetry install --no-dev
poetry export --without-hashes > requirements.txt
poetry run chalice package --stage << parameters.env >> --template-format yaml packaged/
aws cloudformation package --template-file ./packaged/sam.yaml --s3-bucket template-bucket --output-template-file cfn-output_sam.yml