Node.js 'Unknown runtime version named '16' of nodejs.'

Jun 07, 2023 · 1 min read · Post a comment

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


  • Node.js
  • 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: Image: aws/codebuild/standard:6.0.

  ComputeType: !Ref CodeBuildInstanceSize
  Image: aws/codebuild/standard:6.0

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.