SAP-C02 Continuous Improvement for Existing Solutions Practice Question
Network Topology
Refer to the exhibit.
$ aws ec2 describe-instances --region us-east-1 --filters Name=tag:Name,Values=WebServer --query 'Reservations[].Instances[].{ID:InstanceId,State:State.Name,Type:InstanceType,LaunchTime:LaunchTime}' --output tableA DevOps engineer runs the above command. The Auto Scaling group for WebServer instances has a desired count of 3, but the engineer notices that there are 5 instances with the same tag. What is the MOST likely cause?
⚠ Common exam trap
A common trap is to assume that instances in 'terminating' state are not returned by describe-instances, but they are. The filter's tag key must exactly match the instance tags; minor differences can lead to missing or extra results.
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 command is filtering by the wrong tag key.
The `describe-instances` command filters by the `Name` tag with value `WebServer`, returning every instance that has that exact tag, regardless of whether it belongs to the Auto Scaling group. Seeing 5 instances while the ASG desired count is 3 indicates the filter is not specific to the ASG. The engineer is likely filtering by the wrong tag key; they should use an ASG-specific tag such as `tag:aws:autoscaling:groupName`. Option C is incorrect because `describe-instances` returns terminating instances. Option A is less likely because cooldown periods do not affect tag-based instance queries. Option D is incorrect because instances launched without the `Name` tag would not appear in the output.
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 Auto Scaling group has a cooldown period that prevents immediate termination.
Why it's wrong here
Incorrect. A cooldown period prevents scaling actions but does not prevent termination of instances. Instances can still be terminated during a cooldown, so this does not explain the extra instances.
- ✓
The command is filtering by the wrong tag key.
Why this is correct
Correct. The tag key in the filter (Name) may not match the actual tag key on some instances. If the tag key is different (e.g., 'name' or 'web'), those instances would not be returned, but the engineer sees 5 instances, indicating the filter is matching instances from outside the ASG.
- ✗
The other two instances are in a 'terminating' state and are not returned by the command.
Why it's wrong here
Incorrect. The describe-instances command returns instances in any state, including 'terminating' and 'shutting-down'. Therefore, if two instances were in 'terminating' state, they would still appear in the output, and the engineer would see 5 instances. This does not explain the discrepancy.
- ✗
The instances were launched with a different launch template that does not have the tag.
Why it's wrong here
Incorrect. If instances were launched with a different launch template that does not have the tag, they would not have the tag 'Name=WebServer'. Since the engineer sees instances with that tag, this option is not supported.
About these practice questions
Courseiva writes every SAP-C02 question from scratch — 984 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAP-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 SAP-C02 exam.