Cloudformation Error: Resource handler returned message: "The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x)
AWS cdk is outdated
I solved by upgrading aws-cdk-lib to version 2.38.0.
Just change the dependency version in cdk/package.json and run npm install again.
Cloudformation Error: Resource handler returned message: "The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x)