Question 998 of 247
Three Methods to Install the CodeDeploy Agent on EC2 Instances
A company is using AWS CodeDeploy to deploy an application to an Auto Scaling group. The deployment fails because the instances do not have the CodeDeploy agent installed. Which THREE actions are required to resolve this issue?
Quick Answer
The answer is to use AWS Systems Manager Run Command to install the CodeDeploy agent on existing EC2 instances. This is correct because the CodeDeploy agent is a required piece of software that runs on each target instance to pull and execute deployment instructions from the CodeDeploy service; without it, the instance cannot participate in any deployment. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your understanding that fixing a failed deployment requires addressing the root cause on existing instances, not just updating launch configurations or deployment groups—a common trap is thinking a new launch configuration alone will retroactively fix running instances. The three required actions are installing the agent via user data for new instances, baking it into a custom AMI, or using Run Command for existing instances. Memory tip: “Run, Bake, or Boot” — Run Command for live instances, bake into an AMI, or boot with user data.
⚠ Common exam trap
Many exam-takers confuse deployment configuration settings (like 'OneAtATime') with the fundamental requirement of having the agent installed, or think that changing the instance type will somehow resolve the agent dependency.
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
✓
Install the CodeDeploy agent on the instances using user data in the launch configuration.
Specifying the CodeDeploy agent installation script in the user data of a launch configuration ensures that any new instance launched by the Auto Scaling group automatically installs and starts the agent. This is a common practice to bootstrap instances with the required software before they register with CodeDeploy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Install the CodeDeploy agent on the instances using user data in the launch configuration.
Why this is correct
User data can install the agent at launch.
- ✓
Create a new AMI that includes the CodeDeploy agent.
Why this is correct
A pre-built AMI with the agent ensures it's installed.
- ✓
Use AWS Systems Manager Run Command to install the agent on existing instances.
Why this is correct
Run Command can install the agent on running instances.
- ✗
Change the deployment configuration to 'OneAtATime'.
Why it's wrong here
The deployment configuration controls batch size, not agent installation.
- ✗
Update the Auto Scaling group's launch configuration to use a different instance type.
Why it's wrong here
Instance type is irrelevant to agent installation.
Visual reference
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 →
Same concept, more angles
1 more way this is tested on SOA-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is using AWS CodeDeploy to deploy an application to an EC2 instances in an Auto Scaling group. The deployment fails because the instances are not reporting to CodeDeploy. What is the most likely cause?
easy- A.The security group does not allow inbound traffic from CodeDeploy.
- B.The instances do not have the correct IAM role to allow CodeDeploy to access them.
- C.The application is not running on the instances.
- ✓ D.The CodeDeploy agent is not installed on the instances.
Why D: The most likely cause is that the CodeDeploy agent is not installed on the instances. The agent is required to communicate with the CodeDeploy service and execute deployments. Option A is incorrect because the security group needs to allow outbound traffic from the instances to CodeDeploy, not inbound. Option B is incorrect because the IAM role is necessary for the instances to access CodeDeploy, but the immediate issue of not reporting is the agent. Option C is incorrect because the application not running is a symptom, not the cause of the reporting failure.
Last reviewed: Jul 4, 2026
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.
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.
Sign in to join the discussion.