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
886 stars 657 forks source link

package.py should respect package-lock.json when creating an archive for Node.js lambda functions. #423

Closed sflanker closed 1 year ago

sflanker commented 1 year ago

Is your request related to a new offering from AWS?

No, and the guidance to "wait to file a request until the functionality is available in the AWS provider" doesn't make sense because this relates to something that is specifically implemented by this module, and I don't think will ever be the purview of the AWS provider.

Is your request related to a problem? Please describe.

I have node16.x runtime lambda function, and simply running a terraform apply broke my lambda because the packaging process disregards package-lock.json. This breaks a fundamental expectation of npm packages.

Describe the solution you'd like.

Similar to what I think the behavior is with poetry packages having a poetry.lock file, I think package.py should use package-lock.json files, if provided, when generating an archive for a Node.js lambda function.

Describe alternatives you've considered.

Switching to a pre-built Zip archive.

github-actions[bot] commented 1 year 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 1 year ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 1 year 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.