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

Update AWS Lambda runtime to nodejs18.x #12311

Closed
wants to merge 10 commits into from
Closed

Conversation

tampueroc
Copy link

@tampueroc tampueroc commented Dec 22, 2023

AWS notified about Node.js v16 deprecation on AWS Lambda runtime. This PR upgrades AWS Lambda runtime to Node.js v18
Closes: #12310

@jmoe
Copy link

jmoe commented Dec 26, 2023

Waiting for this.

@fnerdrum
Copy link

fnerdrum commented Jan 2, 2024

Lambda upgraded from v2 to v3 of AWS SDK, so I think this is a bit more work. https://aws.amazon.com/blogs/compute/node-js-18-x-runtime-now-available-in-aws-lambda/

Also maybe go directly to nodejs20.x while we're at it?

@tschumann
Copy link

Looks like discussion about the AWS Javascript SDK v3 at #11920 is ongoing.

In relation to this, it looks like https://github.com/serverless/serverless/blob/main/lib/plugins/aws/custom-resources/resources/s3/handler.js is the file that gets deployed and run and I think https://github.com/serverless/serverless/blob/main/lib/plugins/aws/custom-resources/resources/utils.js is the only file that it references (indirectly at that) that uses the AWS Javascript SDK v2.

@tonivdv
Copy link

tonivdv commented Jan 30, 2024

The correct fix is here => #12146

EDIT: I didn't notice this PR targets v2 ... but still more changes are required

@malcyL
Copy link

malcyL commented Jan 30, 2024

I inadvertently created a duplicate of this, which I have now closed: #12334

Testing of this change is working in our staging environments. We obviously need this before the node 16 runtime reaches it's end of life at AWS.

I notice someone else has just asked for this on the issue: #12310 (comment) - AWS are emailing reminding people that the node 16 eol is coming - so lots of people are looking at this I guess.

I'm not clear what else needs to be done here?

Edit: This is very similar to #12055 which bumped the version from 12 to 16.

@malcyL
Copy link

malcyL commented Jan 30, 2024

I'm also looking at the comment above re AWS Javascript SDK v3 and I'm wondering if that is relevant for the v2 branch this PR is targeting?

@tonivdv
Copy link

tonivdv commented Jan 30, 2024

I'm also looking at the comment above re AWS Javascript SDK v3 and I'm wondering if that is relevant for the v2 branch this PR is targeting?

@malcyL afaik it is ... whether it is v2 or v3, if it runs on the node engine >=18 then it requires aws sdk v3

@marslan02
Copy link

Is there an estimated timeline for when this change will be available?

Copy link

@reecebenson reecebenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires AWS SDK v3, should refer to #12146

@tampueroc
Copy link
Author

Updated AWS SDK v3 dependencies accordingly

@vSkoryk
Copy link

vSkoryk commented May 24, 2024

Will this one be merged?

@j0k3r
Copy link
Contributor

j0k3r commented Jun 4, 2024

Can be close as it was added in https://github.com/serverless/serverless/releases/tag/v3.39.0

@tampueroc
Copy link
Author

tampueroc commented Jun 7, 2024

@j0k3r The mentioned release targets a different version (v3), this PR aims to solve the issue on v2.

@malcyL
Copy link

malcyL commented Jun 7, 2024

@j0k3r Can I reiterate @tampueroc's comment above.

This issue is not fixed by https://github.com/serverless/serverless/releases/tag/v3.39.0

This issue is about the deprecation of the NodeJS v16 runtime in AWS and whether this is going to be fixed in v2 of Serverless.

The previous node version deprecation was fixed in v2 here: #12055 which was merged into the [serverless:v2](https://github.com/serverless/serverless/tree/v2) branch - not main.

This issue was raised in multiple places which have all been closed pointing to this issue as the solution, a few but maybe not all are:

While v2 is obviously old and upgrading to v3 is the obvious solution - this PR is important for people who are unable to do so immediately and are facing the AWS EOL of Node 16.

If the serverless framework is not going to fix this for the v2 branch - this needs to be communicated

@reecebenson
Copy link

@malcyL It was confirmed in discussions that no minor fixes or new features will come to v2, see here. v2 hasn't been updated since July 10th, so I wouldn't assume they would backport this Node v18 change to v2.

@malcyL
Copy link

malcyL commented Jun 7, 2024

@reecebenson Thank you.

The link you reference was made on 6th April 2022.

The previous PR to bump this, #12055, was merged on 10th July 2023 - after this statement. Obviously there is more of a change here with the need to bump the SDK.

But I guess people were hoping that this would be similar and would get merged.

Obviously not - so this does seem to mean that v2 will stop working with AWS's EOL of NodeJS 16.

@tampueroc
Copy link
Author

@Danwakeem Asking you also since you merged the last maintance PR to v2 last year (#12055). Didn't found any discussions or announcment after #12055 got merged.

@Mmarzex
Copy link
Contributor

Mmarzex commented Jun 7, 2024

Hi @tampueroc we are not planning further releases of v2. V3 has been GA and stable for a few years at this point and now V4 is available. Both V3 and V4 have this fix in place. I'd recommend upgrading to more recent version.

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.

None yet