-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Upgrade Custom Resource functions to use Node.js 18 #12133
Comments
Relates to #12116 |
I suggest to retrieve the runtime provide by the user in the serverless template :
|
Just got notices from AWS on end-of-support for node 16 runtime - end of standard support is 11 Mar 2024 (deprecated support ending 11 Apr 2024). I'd suggest move fixed value to nodejs 20.x (or use the runtime from the provider->runtime setting, as suggested by @ptitkosmos ). EDIT: notice has different date than the lambda runtime page, but still coming relatlively soon - and node16 has been out of support since September 2023. "As described in the Lambda runtime support policy [2], end of support for language runtimes in Lambda happens in several stages. Starting on June 12, 2024, Lambda will no longer apply security patches and other updates to the Node.js 16 runtime used by Lambda functions, and functions using Node.js 16 will no longer be eligible for technical support. Also, Node.js 16 will no longer be available in the Console, although you can still create and update functions using Node.js 16 via AWS CloudFormation, the AWS CLI, AWS SAM, or other tools. Starting July 15, 2024, you will no longer be able to create new Lambda functions using the Node.js 16 runtime. Starting August 15, 2024, you will no longer be able to update existing functions using the Node.js 16 runtime." |
Also relates to issue #12265 |
"Starting August 15, 2024, you will no longer be able to update existing functions using the Node.js 16 runtime." is the killer. So in 8 months in cases where the custom resources are used, unless something is changed then serverless framework will simply fail. You'll no longer be able to deploy. 😨 Seriously thinking it's time to migrate away. 🤔 |
Is there any hope of a fix for this issue being merged? Or should my team spend our time before August 15th migrating our lambda infrastructure to another solution?... |
Hi everyone, sorry we've been slow to respond here. This change will be available in the Serverless v4 beta that will be releasing within the next week. |
@Mmarzex I hope next week. For time being any hacky solution please provide? so that we cannot sit idle till next week ;) |
does somebody found any hack to this ? |
@noumanbhatti @sarangpatel
You will also need to patch the serverless/lib/plugins/aws/custom-resources/index.js file and update the version to 18/20. |
Hey @Mmarzex, any updates on the release ? |
@Mmarzex we are getting tense, because of this. plz update update |
When is the ETA of this? June is not so far away from now. |
This won't be backported into 3.x? Concerned having to force move to a new major (especially a beta SLS) version will bring more risk rather than just having SLS 3.x patched for this change... |
v4 alpha looks to be out now https://github.com/serverless/serverless/tree/v4.0 |
Looks like the custom resource upgrade to node20.x is in it as well bd8cef3 |
Is there any chance that this will be backported into 3.x? There isn't much time left until AWS will deny a lambda update completely, and then we won't be able to deploy our projects anymore. |
Any updates on this, especially considering the lack of full V4 rollout at this point? |
I am also interested in updates on this. |
It would be great to hear an update on this. |
this seems to work:
ref: https://serverlesscode.com/post/customizing-serverless-with-plugins/ (i rlz the general guidance right now is a little wonky, hth... ty for those that have supplied examples thus far!)
|
Thanks @wesyoung! But that would mean that this is not true? (Would surprise me to be honest.)
|
maybe- it makes the error (notice) go away for stacks that are already created. i'll guess i'll have to destroy and rebuild a stack to test (?) |
@jonasduever i think you're right, you can deploy the change to get rid of the notice, but if you try to delete and then re-create that part of the stack (the logs section), CF hangs for a good 30-40min and then fails, which highlights your point i think. guess we're stuck... (gofundme donation to serverless ? it's hard running a biz on opensource sometimes... :)) |
It should be fixed by #12146 but the maintainer did not review and merge it :( |
🥱 |
We just released the beta of Framework v4 which contains updating the custom resources runtimes. Looking into the work involved in maintaining this for V3. We're watching the AWS deadline. |
thank you :) |
@ac360
It would be reasonable to review and merge the community contribution of #12445 as a way to minimize the work required to maintain this for V3. If I read your comment uncharitably, you are pressing V3 users to V4, which has connotations. |
Thank you. You saved me. |
Our commitment to maintaining V3 for critical security and bug fixes through 2024 stands. We'll upgrade this next week. |
This is in progress.. |
Hi everyone, thank you for your patience, this is now supported in a new v3 release, specifically v3.39.0, it is available on NPM now. |
Outstanding news! @Mmarzex |
Is there an existing issue for this?
Use case description
Node.js 16 is going out of support (security support ends on 11 Sep 2023).
The Lambda function for custom resources have nodejs16 runtime hardcoded:
serverless/lib/plugins/aws/custom-resources/index.js
Lines 165 to 179 in d0e3056
In multiple projects Lambda functions using unsupported nodejs version would be highlighted as security risk.
Proposed solution (optional)
Update customResourceFunction.runtime to
nodejs18.x
The text was updated successfully, but these errors were encountered: