🔥 3-day streak
AWS Certified Developer - Associate20 / 150
Question 20 of 150

A development team uses AWS CodeBuild to build a Java application. Their buildspec.yml runs unit tests during the build phase, but they notice that when a unit test command returns a non-zero exit code, CodeBuild still continues to the post_build phase and produces artifacts, resulting in broken builds being deployed. They want the build to stop immediately and be marked as FAILED if any command in the build phase fails. What is the correct explanation of CodeBuild behavior and how to fix this?

Reviewed for accuracy · Report an issueNext question