Courseiva
Design for New SolutionseasyMultiple ChoiceObjective-mapped

SAP-C02 Design for New Solutions Practice Question

Network Topology
aws ec2 describe-instancesfilters "Name=tag:Namequery "Reservations[].Instances[?State.Name=='running'].[InstanceId]"output textRefer to the exhibit.

A developer runs the above AWS CLI command. What is the expected output?

⚠ Common exam trap

The trap here is that candidates may overlook the `--filters` parameter and assume the command returns all instance IDs, or they may misinterpret the JMESPath query as invalid, when in fact it is a standard pattern for extracting nested fields in AWS CLI output.

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

A list of instance IDs for running web-server instances

The AWS CLI command uses `describe-instances` with a `--filters` parameter to select only instances with a tag `Name=web-server` and a state of `running`. The `--query` parameter then extracts the `InstanceId` values from the result. Therefore, the output is a list of instance IDs for running web-server instances, making option B correct.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A list of public IP addresses

    Why it's wrong here

    The query requests InstanceId, not IP.

  • A list of instance IDs for running web-server instances

    Why this is correct

    The command returns InstanceIds of running instances with the specified tag.

  • All instance IDs regardless of state

    Why it's wrong here

    The filter limits to running state.

  • An error because the query syntax is incorrect

    Why it's wrong here

    The query syntax is valid.

About these practice questions

Courseiva writes every SAP-C02 question from scratch — 1,660 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 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.