Skip to content

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

@sflanker

Description

@sflanker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions