DVA-C02 Deployment Practice Question
A company uses AWS CodeCommit for source control and AWS CodeBuild for building a Java application. They have a CodePipeline that deploys the built artifacts to an Auto Scaling group using CodeDeploy. Recently, the build stage started failing with the error: 'BUILD FAILED: Could not resolve dependencies for project'. The developer checks the buildspec.yml and sees that it uses Maven to download dependencies from a private repository. The developer also notices that the build environment is a managed Docker image. What is the most likely cause?
⚠ Common exam trap
DVA-C02 often tests the misconception that IAM permissions alone control access to private repositories, when the real issue is network reachability from CodeBuild's managed environment into a VPC.
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 environment does not have network access to the private Maven repository because it is not configured with a VPC.
CodeBuild runs in a managed Docker image that, by default, has internet access but no route to private VPC resources such as an internal Maven repository. To reach a private repository hosted inside a VPC, the CodeBuild project must be configured with VPC settings (VPC ID, subnets, security groups). Without that, Maven cannot resolve dependencies and the build fails.
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 CodeBuild project does not have the necessary IAM permissions to access the private Maven repository.
Why it's wrong here
IAM roles in AWS CodeBuild grant permissions to interact with AWS services like S3, CloudWatch, or ECR, enabling the build process to fetch source code or publish artifacts. However, these roles do not directly provide authentication or authorization for accessing external private Maven repositories. Access to such repositories typically relies on credentials (e.g., username/password, API tokens) configured within the build environment or `buildspec.yml`, not AWS IAM permissions, which are designed for AWS resource access control.
- ✓
The build environment does not have network access to the private Maven repository because it is not configured with a VPC.
Why this is correct
CodeBuild projects, by default, run in a managed AWS environment with public internet access but are isolated from private Amazon Virtual Private Cloud (VPC) networks. To access a private Maven repository residing within a private subnet of a VPC, an on-premises network via Direct Connect/VPN, or another private network, the CodeBuild project must be explicitly configured to run within a specified VPC. This configuration provisions Elastic Network Interfaces (ENIs) in the designated subnets, allowing the build environment to establish private network connectivity to the repository.
- ✗
The buildspec.yml has a syntax error in the 'phases' section.
Why it's wrong here
A syntax error in the `buildspec.yml` file, such as an incorrect YAML structure or an invalid keyword in the `phases` section, would typically cause the CodeBuild service to fail parsing the build specification. This would result in an immediate build failure with an error message indicating a malformed `buildspec` or an inability to interpret the commands, rather than a specific dependency resolution timeout or network error during the execution of a valid command.
- ✗
The Java compiler version is incompatible with the project.
Why it's wrong here
An incompatibility between the Java compiler version and the project's source code or target bytecode version would manifest as compilation errors during the `build` phase, after all dependencies have been successfully downloaded and placed in the build environment. These errors would typically involve specific language feature mismatches, API deprecations, or class version conflicts, distinct from a failure to retrieve the necessary dependency artifacts in the first place.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 1,135 original DVA-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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.