terraform-aws-modules / terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/lambda/aws
Apache License 2.0
909 stars 681 forks source link

Poetry support for groups dependencies #500

Closed marrataj closed 10 months ago

marrataj commented 1 year ago

Is your request related to a problem? Please describe.

For managing dependencies of our lambdas we're using poetry, however it makes it frustraiting that in order to build dependencies for different lambdas in one project you either need to specify separate pyproject.toml file for each lambda, even though they might share same packages, or do some tricks with commands in source_path that will install and zip dependecies for specific lambda, specially when in one pyproject.toml you can specify common packages and create separate groups of packages for specific lambda, then, it's enough to either call: poetry install --with=<group_name> -- this will install common and specific lambda packages or poetry export --with=<group_name> --directory=<pyproject dir> > requirements.txt -- this will export common and lambda specific dependencies to requirements.txt

Describe the solution you'd like.

It would be nice to have groups parameter passed to poetry command, which would then include groups dependencies, and avoid a need of having multiple pyproject.toml files in one project, which would make it easier to maintain. Also then, whenever new dependency needs to be added it's then enough to do it from root path of the project.

Tricky part with this solution might be that lambda deployment shouldn't be dependent on changes in pyproject.toml, as adding dependency to one lambda would cause rebuild of all lambdas.

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 10 months ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 9 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

antonbabenko commented 3 months ago

This issue has been resolved in version 7.6.0 :tada: