Courseiva
Design for New SolutionsmediumMultiple ChoiceObjective-mapped

SAP-C02 Design for New Solutions Practice Question

Network Topology
aws ec2 describe-instancesquery "Reservations[*].Instances[*].[InstanceIdoutput table+Refer to the exhibit.```| DescribeInstances || i-0123456789abcdef0 | running || i-023456789abcdef01 | stopped || i-03456789abcdef012 | terminated |

A Solutions Architect runs the AWS CLI command shown in the exhibit. Which statement accurately describes the output?

⚠ Common exam trap

It's easy for candidates to assume `--query` filters the instances themselves (like a WHERE clause in SQL), but it only shapes the output fields—it does not reduce the set of instances returned, so without an explicit `--filters` parameter, all instances are listed.

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 lists all instances regardless of state.

The AWS CLI command `aws ec2 describe-instances` without any filter returns all EC2 instances in the current region, regardless of their state (running, stopped, terminated, etc.). The `--query` parameter is used correctly to extract specific fields from the JSON output, but it does not filter instances by state. Therefore, the output includes every instance, and option A is 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.

  • The command lists all instances regardless of state.

    Why this is correct

    The command returns all instances with their state.

  • The command lists instances in JSON format.

    Why it's wrong here

    The --output table specifies table format, not JSON.

  • The command lists only running instances.

    Why it's wrong here

    The query does not filter by state; it returns all instances.

  • The command fails because --query is used incorrectly.

    Why it's wrong here

    The syntax is correct; it works.

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.