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

AWS Custom Resource Lambda still using NodeJS 14.x #11359

Open
1 task done
ashley-jisc opened this issue Aug 26, 2022 · 6 comments
Open
1 task done

AWS Custom Resource Lambda still using NodeJS 14.x #11359

ashley-jisc opened this issue Aug 26, 2022 · 6 comments

Comments

@ashley-jisc
Copy link

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Use case description

This is effectively the same as #10432 with the exception that nodejs 14 is not EOL.

The custom resource lambda (*-custom-resource-apigw-cw-role) created automatically via serverless has a hardcoded runtime of "nodejs14.x":

serverless/lib/plugins/aws/customResources/index.js

When building our product with Serverless, we wish to have parity across our services when it comes to runtimes. We've upgraded to nodejs 16 but we still have a bunch of custom-resource-apigw-cw-role lambdas stuck at nodejs 14.

Proposed solution (optional)

  • Upgrade it to node16
  • Allow a CLI flag to override it on deployment
@medikoo
Copy link
Contributor

medikoo commented Aug 29, 2022

@ashley-jisc PR is welcome!

@300LiterPropofol
Copy link

I think I have encountered something similar! I posted a discussion here #11364

But in my case the default version is nodejs12.x and I couldn't find anywhere to change. AWS is gonna stop nodejs12.x support so this becomes a bug for me. What is your serverless version?
Mine is

Framework Core: 2.59.0 (standalone)
Plugin: 5.4.4
SDK: 4.3.0
Components: 3.17.0

@ashley-jisc
Copy link
Author

I think I have encountered something similar! I posted a discussion here #11364

But in my case the default version is nodejs12.x and I couldn't find anywhere to change. AWS is gonna stop nodejs12.x support so this becomes a bug for me. What is your serverless version? Mine is

Framework Core: 2.59.0 (standalone)
Plugin: 5.4.4
SDK: 4.3.0
Components: 3.17.0

They updated from nodejs12.x to nodejs14.x - I talk about it in my original post, and link the issue... ????

@ALOHACREPES345
Copy link
Contributor

Maybe this issue is resolved by #11367.

But, if there is no special reason, I think it would be better that this Lambda also refers "runtime" in serverless.yml as well as other functions. This may let users to avoid upgrading serverless version due to this hardcorded runtime version.

If you agree, I'll try to work on it. @medikoo

@medikoo
Copy link
Contributor

medikoo commented Oct 5, 2022

@ALOHACREPES345 I think it's safer to keep it fixed, to avoid unexpected compatibility issues

@ALOHACREPES345
Copy link
Contributor

@medikoo
hmm... If changing fixed version like #11367 could be acceptable, changing to referring runtime can also be acceptable. Because it means same in terms of just changing the runtime version.

before

Runtime: 'nodejs14.x',

after

Runtime: providerConfig.runtime || 'nodejs14.x',
or
Runtime: awsProvider.getRuntime(),  

But I may have overlooked compatibility point of view, so I would follow your opinion. Thank you.

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

No branches or pull requests

4 participants