YAML_FILE_ERROR Message: batch yaml definition is required

Solution 1:

I don't think you want the batch build settings. The rest of your buildspec looks like a "single build".

batch:
  fast-fail: false

Solution 2:

Check your codebuild project configuration and make sure it has the CodeBuild action setting "build type" to "single build" and not to "batch build".

If you need it as "batch build" then you have to configure it properly in the buildspec. But I understand from the question that is not the case.

To edit this go to your pipeline -> edit -> edit stage (build) -> and then click on edit icon in AwsCodeBuild action card:

option screen capture

If you go through CDK then make sure CodeBuildAction have this property set to false:

executeBatchBuild: false

(Which is the default value, but I'm putting like this to avoid confusion.)