Courseiva
Question 457 of 724
DeploymentmediumMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A developer is using AWS CodeBuild to build a Java application. The build fails with the error 'BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE'. What is the most likely cause?

⚠ Common exam trap

Candidates often confuse build-phase errors (like syntax errors in commands) with environment setup errors (like image pull failures), leading them to select options related to build commands or artifacts instead of recognizing the error message's specific reference to container image retrieval.

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 Docker image specified in the build environment does not exist or the repository is not accessible.

The error 'BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE' in AWS CodeBuild indicates that the service cannot pull the specified Docker image from the repository. This occurs when the image name/tag is incorrect, the image does not exist in the specified registry (e.g., Amazon ECR or Docker Hub), or the CodeBuild service role lacks the necessary permissions (e.g., ecr:GetDownloadUrlForLayer, ecr:BatchGetImage) to access the repository. Option B correctly identifies this as the most likely cause.

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 build environment does not have enough memory.

    Why it's wrong here

    Insufficient memory in an AWS CodeBuild environment typically manifests as an OutOfMemoryError during the build process itself, particularly when compiling large projects or running memory-intensive tests. This error would occur *after* the build environment successfully provisions and attempts to execute build commands within the Docker container. A "pull image" error, however, indicates a failure at an earlier stage, specifically when CodeBuild tries to download the specified Docker image to even *start* the build environment, making memory capacity irrelevant at that point.

  • The Docker image specified in the build environment does not exist or the repository is not accessible.

    Why this is correct

    A "pull image" error in AWS CodeBuild directly signifies that the CodeBuild service was unable to retrieve the specified Docker image from its source repository. This can occur if the image name or tag is incorrect, leading to the image not being found, or if CodeBuild lacks the necessary IAM permissions to access a private repository like Amazon ECR. Network connectivity issues to the repository or misconfigured repository policies could also prevent a successful image pull, halting the build before any commands execute.

  • The build command has a syntax error.

    Why it's wrong here

    A syntax error within a build command defined in the `buildspec.yml` file would result in a build failure during the `BUILD` phase, specifically when the shell attempts to execute the malformed command. The error message would typically indicate a parsing issue or an unrecognized command, such as `command not found` or `syntax error near unexpected token`. This type of error occurs *after* the Docker image has been successfully pulled and the build environment initialized, which is distinct from an initial image pull failure.

  • The buildspec.yml file does not define artifacts.

    Why it's wrong here

    If the `buildspec.yml` file does not define any artifacts, or if the specified artifact paths do not exist at the end of the build, CodeBuild would complete the build process but might report a warning or an error related to artifact upload. The build itself would likely succeed in terms of command execution, but the output artifacts would be missing or incomplete. This issue occurs at the very end of the build lifecycle, long after the initial Docker image pull, and would not prevent the build environment from even starting.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-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 DVA-C02 exam.