Increasing your node js lambda version and deploying through CodePipeline can throw an error like:
Phase context status code: YAML_FILE_ERROR Message: Unknown runtime version named '16' of nodejs. This build image has the following versions: 12, 14
- sudo privileges
The error is pretty much self-explanatory and it’s telling you, the image that you are using doesn’t support node version 16. To solve the issue you should get rid of
Image: aws/codebuild/standard:5.0 and replace it with:
ComputeType: !Ref CodeBuildInstanceSize
After updating your image in your configuration file you can update the node version to 16 and the issue will be resolved.
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.