Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add custom runtime support based on the defined runtime #26

Merged

Conversation

lkeijmel
Copy link
Contributor

When creating custom resource functions, try to use the defined runtime of the serverless config. This is useful when your project is already running on a new(er) Node version.

@sander-bol
Copy link

This will break deployments for people using non-Node runtimes like Go or .Net, as the custom lambda will still be deployed as NodeJS code which can't be handled by those runtimes.

Perhaps tighten it down a bit to only do this if the runtime identifier starts with node ?

@lkeijmel
Copy link
Contributor Author

Good catch, didn't think of that. Have changed it with a check for that

@lkeijmel lkeijmel requested a review from j0k3r March 4, 2025 12:03
@mnapoli
Copy link
Contributor

mnapoli commented Mar 4, 2025

Thanks! Does this PR mean that there will be an immediate impact for users?

I see that everywhere in tests the default runtime for custom resources changed from node 16 to 18, that will be applied to all user projects?

If yes, is that 100% safe?

@sander-bol
Copy link

sander-bol commented Mar 4, 2025

We (am a colleague of Laurence) have been running this in production for quite some, and it works fine for the custom resources we use.. but we don't use all of them. So... relying on Node's backwards compatibility promises here.

On the other hand, out of the blue not being able to deploy new copies of your stack, or even later down the line even updates to your stack, because AWS follows their deprecation policy and starts blocking deployments to outdated runtimes at some point is going to certainly break things.

The deadlines for NodeJS18.x are:

Deprecation: Sep 1, 2025
Block function creation: Oct 1, 2025
Block function update: Nov 1, 2025

@mnapoli mnapoli merged commit f19eb4d into oss-serverless:main Mar 5, 2025
3 checks passed
@mnapoli
Copy link
Contributor

mnapoli commented Mar 5, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants