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
Prerequisites
- Node.js
- sudo privileges
Solution
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: Image: aws/codebuild/standard:6.0
.
Environment:
ComputeType: !Ref CodeBuildInstanceSize
Image: aws/codebuild/standard:6.0
Type: LINUX_CONTAINER
After updating your image in your configuration file you can update the node version to 16 and the issue will be resolved.
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.