Courseiva
SDLC Automation →hardMultiple Choice

DOP-C02 SDLC Automation Practice Question

Network Topology
$ aws deploy get-deployment-groupapplication-name MyAppdeployment-group-name MyDGRefer to the exhibit."deploymentGroupInfo": {"applicationName": "MyApp","deploymentGroupName": "MyDG","deploymentConfigName": "CodeDeployDefault.AllAtOnce","ec2TagFilters": ["Key": "Environment","Value": "Production","Type": "KEY_AND_VALUE"],"autoScalingGroups": [],"serviceRoleArn": "arn:aws:iam::123456789012:role/CodeDeployServiceRole","targetRevision": {"revisionType": "S3","s3Location": {"bucket": "my-app-bucket","key": "my-app.zip","bundleType": "zip"},"deploymentStyle": {"deploymentType": "IN_PLACE","deploymentOption": "WITH_TRAFFIC_CONTROL""loadBalancerInfo": {"elbInfoList": ["name": "my-alb"

A CodeDeploy deployment group is configured as shown in the exhibit. During a deployment, the deployment fails because the instances are not found. What is the MOST likely reason?

⚠ Common exam trap

Watch out — candidates often confuse 'instances not found' errors with permission or load balancer issues, but the error is a direct result of tag mismatch, which is the most common cause in CodeDeploy tag-based deployments.

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 EC2 instances do not have the tag 'Environment' with value 'Production'

The exhibit shows the deployment group is configured to match EC2 instances with the tag 'Environment' set to 'Production'. If the instances do not have this exact tag key-value pair, CodeDeploy cannot find them during the deployment, causing the failure. The error 'instances are not found' directly points to a tag mismatch, not to permissions or load balancer issues.

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 deployment configuration 'CodeDeployDefault.AllAtOnce' is not compatible with in-place deployments

    Why it's wrong here

    CodeDeployDefault.AllAtOnce is a predefined deployment configuration that tells CodeDeploy to deploy to all eligible instances simultaneously. It is fully supported for in-place deployments, so a compatibility problem is not the cause. The deployment would instead fail earlier during target discovery because the tag filter matched no EC2 instances, resulting in a 'No instances found' error.

  • ✓

    The EC2 instances do not have the tag 'Environment' with value 'Production'

    Why this is correct

    The deployment group's Amazon EC2 tag group is configured with key 'Environment' and value 'Production', and CodeDeploy identifies target instances solely by this tag filter. If no running instance carries both the exact key and value, CodeDeploy cannot discover any targets and the deployment fails with a 'No instances found' error before any other step executes. Therefore, the missing tag is the root cause of the failure.

  • ✗

    The service role ARN is incorrect and does not have the necessary permissions

    Why it's wrong here

    An incorrect service role ARN or insufficient role permissions would cause a distinct IAM or API error, such as 'InvalidServiceRole' or an AccessDenied when CodeDeploy attempts to describe EC2 instances or access other services. In the scenario, the role ARN is valid and the deployment proceeds, but it stops at the point of instance discovery because no tagged instances exist. Permission issues would not simultaneously yield an empty instance list in this way.

  • ✗

    The load balancer 'my-alb' is not registered with the instances

    Why it's wrong here

    The load balancer 'my-alb' in a deployment group is used for connection draining and traffic shifting after instances are deployed, not for locating instances. Instance discovery relies entirely on the tag group or Auto Scaling group, not on load balancer membership or target registration. Even if 'my-alb' had no registered instances, CodeDeploy would still attempt the deployment based on tags, and the failure here comes from the missing Environment=Production tag, not from load balancer registration.

About these practice questions

Courseiva writes every DOP-C02 question from scratch — 1,298 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.