Skip to content

Support Lambda custom runtimes #529

@theburningmonk

Description

@theburningmonk

Is your feature request related to a problem? Please describe.
When using Lambda custom runtimes, I'd like to use the plugin to bundle my js but the custom runtimes (provided | provided.al2 | provided.al2023) are not supported.

Describe the solution you'd like
In the helper.ts module, add the Lambda custom runtimes to the list of supported runtimes.

Describe alternatives you've considered
Right now, the workaround I have is to:

  1. leave the runtime on one of the supported Node runtimes
  2. add another plugin (a local one to the project) that will update the Runtime in the generated CloudFormation template AFTER serverless-esbuild has bundle and generated the artefact

This is obviously not ideal and is a barrier for to people to run out alternative runtimes like Bun and LLRT.

Additional context
Looking at the helper.ts module, it needs to match the node version from provider.runtime. We will need another way to tell serverless-esbuild which node version to use if provider.runtime is one of the custom runtimes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions