-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(custom-resources): use lambda.Runtime.NODEJS_18_X by default in Provider #23682
Comments
+1 for this. Node 14 EOL is now rapidly approaching! |
Node18 has been supported in GovCloud and AWS China regions as well. I believe we can create a PR for this now. |
Hi, Any updates on this? |
@cornelcroi we are working to move to Node 18 but your application should not be impossible to deploy. If you are seeing errors related to Node 12, then you need to update your aws-cdk-lib version. aws-cdk-lib exclusively uses Node 14+ currently. |
It might not be the most elegant solution, but If you don't want to be blocked by CDK lib releases, you could also use an aspect to change the runtime of the lambda created by, for example, the provider framework. // Change the provider framework lambda runtime to node18.
Aspects.of(this).add(node -> {
if (node instanceof CfnFunction) {
if (((CfnFunction) node).getRuntime().startsWith("node")
&& !((CfnFunction) node).getRuntime().equals("nodejs18.x")) {
((CfnFunction) node).setRuntime("nodejs18.x");
}
}
}); |
We did this, but we have missed some. Closing this in favor of the bug report that's more up to date #26461 |
|
Describe the feature
Similar to #19117 we should update to latest supported Node.js runtime for the custom-resources lambda prior to Node 14 going out of service.
aws-cdk/packages/@aws-cdk/custom-resources/lib/provider-framework/provider.ts
Line 210 in 2d40d77
Use Case
All lambdas created by aws-cdk internally should be updated prior to EOL.
Proposed Solution
Update to NODEJS_18_X when creating lambda in custom-resources.
Other Information
No response
Acknowledgements
CDK version used
2.60.0
Environment details (OS name and version, etc.)
MacOS 12.6.2
The text was updated successfully, but these errors were encountered: