SOA-C02 Deployment, Provisioning, and Automation Practice Question
A company uses AWS CodePipeline to deploy a web application to Amazon EC2 instances behind an Application Load Balancer. During a deployment, the pipeline fails at the Deploy stage with an error indicating that the CodeDeploy agent is not responding. The instances are in an Auto Scaling group. What is the MOST likely cause of this issue?
⚠ Common exam trap
SOA-C02 often tests the distinction between agent-level failures and IAM/network-level failures; candidates frequently pick the IAM role answer because permissions feel like the default cause, but 'agent not responding' specifically points to the agent software itself.
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 CodeDeploy agent is not installed on the EC2 instances.
The CodeDeploy agent is a software package that must be installed and running on each EC2 instance to receive deployment instructions from the CodeDeploy service. If the agent is absent, the service cannot communicate with the instance, producing the 'agent not responding' error. Auto Scaling group instances launched from an AMI that lacks the agent will exhibit exactly this symptom.
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 pipeline does not have a VPC endpoint to connect to the instances.
Why it's wrong here
A missing VPC endpoint is not the cause because CodePipeline itself communicates with the CodeDeploy service through public APIs, never directly to the EC2 instances. The CodeDeploy agent on each instance polls the CodeDeploy service over HTTPS (optionally via a VPC endpoint), but if the agent is not installed, it makes no calls at all; adding a VPC endpoint would not create a heartbeat, so the deployment would still see the instance as unresponsive.
- ✗
The IAM role attached to the instances does not have permissions for CodeDeploy.
Why it's wrong here
IAM permissions for CodeDeploy are necessary for the agent to call service APIs, but the specific error 'agent is not responding' indicates the agent process is not installed or running on the instance. If the agent were present but lacked permissions, it would still register and send heartbeats, and you would instead see authentication or authorization errors in the agent logs or a 'GetDeployment' API failure, not a total absence of communication.
- ✓
The CodeDeploy agent is not installed on the EC2 instances.
Why this is correct
The CodeDeploy agent must be installed and running on every EC2 instance that participates in a CodeDeploy deployment. This background service registers the instance with CodeDeploy, polls for deployment instructions, runs the lifecycle events on the instance, and reports success or failure back to the service. When the agent is missing, no instance ever reports back, so CodePipeline fails with a message like 'No hosts received a command' or 'Overall deployment failed because no instances have been successfully registered.'
- ✗
The Application Load Balancer is not configured with a target group.
Why it's wrong here
The Application Load Balancer and its target group configuration are irrelevant to whether the CodeDeploy agent is responding. Target groups and load balancers are only used in blue/green deployments to shift traffic between old and new instance fleets, and in-place deployments do not require any ALB resources at all. The 'agent not responding' error is caused by the absence of the agent on the instances, not by any misconfiguration of traffic routing.
Go deeper
Related to this question
About these practice questions
One of 1,169 original SOA-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 SOA-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 SOA-C02 exam.