Troubleshooting and Optimization
An AWS CodeBuild execution reports BUILD as FAILED, followed by UPLOAD_ARTIFACTS as FAILED. The build log shows a compiler error before packaging, and the upload log reports that the expected artifact directory is missing. What should the developer address first?
Show the answer
Correct answerB. Correct the source compilation error.
AWhy not this: A missing artifact directory indicates absent build output rather than an S3 authorization failure.
BWhy this is right: The compilation failure occurred first and prevented creation of the files expected by the artifact upload phase.
CWhy not this: Additional upload time cannot create artifacts that the failed build did not produce.
DWhy not this: The logs identify a missing local artifact directory, not a cross-Region upload problem.
The compiler error prevented the build from producing the expected artifacts, making the upload failure a downstream symptom. Broadening S3 access does not resolve an artifact directory that was never created.