Courseiva
SDLC Automation →easyMultiple Choice

DOP-C02 SDLC Automation Practice Question

A DevOps team uses AWS CodeBuild to compile code and run unit tests. The team notices that builds are failing with a timeout error after 60 minutes. What is the most likely cause and solution?

⚠ Common exam trap

Watch out — candidates often confuse a timeout error with resource constraints (like compute size) or source code issues, but the specific 60-minute failure point is a direct indicator of the default build timeout being exceeded.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The build timeout limit is exceeded; increase the timeout in CodeBuild project settings.

The default build timeout for AWS CodeBuild is 60 minutes. When a build runs longer than this limit, it fails with a timeout error. The correct solution is to increase the timeout value in the CodeBuild project settings, which can be set up to a maximum of 8 hours (480 minutes) for on-demand compute environments.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The buildspec has syntax errors; validate the YAML.

    Why it's wrong here

    Invalid buildspec YAML causes CodeBuild to fail during the project's validation phase before any commands execute, typically surfacing as a clear parse error such as 'YAML_FILE_ERROR' or an invalid-format exception in the logs. This type of failure terminates the build immediately rather than running until a duration limit, so it would never manifest as a timeout. The reported symptom is a timeout, which means the build was actively running for an extended period, not halted by malformed configuration.

  • ✗

    The build environment is too small; increase compute type.

    Why it's wrong here

    Insufficient compute resources (e.g., a small general1.small environment) usually result in resource exhaustion failures like out-of-memory crashes, compiler aborts, or exit code 137, not a timeout. CodeBuild's timeout setting is a project-level duration cap independent of compute type; increasing the compute size does not extend the maximum allowed build time. While a larger instance might execute more quickly, it does not alter the configured timeout limit, so the core issue of a build exceeding the project's time bound remains unresolved.

  • ✗

    The source code repository is too large; use shallow clone.

    Why it's wrong here

    A large source repository can lengthen the source download and checkout phase, but this alone does not cause the CodeBuild timeout because the timeout applies to the entire build lifecycle, including the clone step. Shallow cloning reduces the amount of data transferred and speeds up the checkout, yet it does not increase the maximum execution time permitted by the project's timeout configuration. Even with a shallow clone, if the build phases after checkout still exceed the existing limit, the build will continue to time out; the error message points to duration, not source size.

  • ✓

    The build timeout limit is exceeded; increase the timeout in CodeBuild project settings.

    Why this is correct

    CodeBuild projects have a configurable 'Timeout' property (default 60 minutes) that caps the total time from build start to the last phase, including download, install, build, and post-build. When a build runs past this limit, CodeBuild forcibly terminates it and records a 'BUILD_TIMEOUT' error, which matches the scenario described. To resolve it, the DevOps team can increase the timeout in the CodeBuild project settings (via console, AWS CLI, or CloudFormation), setting it up to 480 minutes (8 hours) for standard builds. This directly addresses the root cause rather than masking a resource or syntax problem.

About these practice questions

One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.