Update node version of the -custom-resource-apigw-cw-role


Node version 16.X will be deprecated soon, and I need to upgrade my lambdas (-custom-resource-apigw-cw-role) to node 18.X or higher, how can I do it?

Do you see a runtime: under either provider or each of the functions? It probably says runtime: nodejs16.x. Change that to runtime: nodejs18.x

My functions are running in dotnet6.

In my serveless.yml file I don’t have nodejs reference directly

Are you using any custom plugins?

Yes, I’m using a serverless plugin, but the *-custom-resource-apigw-cw-role isn’t created by serverless framework in REST API functions?

There’s a good chance that plugin is creating the Lambda that’s causing the problem. Potentially the easiest solution is just to update the plugin version and deploy again. You can be certain by looking through the Lambda console to find the Lambda function that is causing the problem then use the CloudFormation console to determine how it’s being deployed.