SAP-C02 Design for New Solutions Practice Question
Network Topology
A solutions architect runs the above CLI command. What is the output format?
⚠ Common exam trap
Watch out — candidates often confuse the `--query` output structure with the default JSON output format, assuming it always returns a JSON object with keys, when in fact JMESPath projections can return arrays of scalars or objects depending on the expression.
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 JSON array of strings.
The CLI command shown is `aws ec2 describe-instances --query 'Reservations[].Instances[].InstanceId'`. The `--query` parameter uses JMESPath to extract a list of instance IDs, which results in a JSON array of strings (e.g., `["i-123", "i-456"]`). AWS CLI output defaults to JSON unless `--output` is specified, and the JMESPath expression here returns an array, not a single object or table.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
YAML formatted output.
Why it's wrong here
Default output is JSON unless --output yaml is specified.
- ✗
A text table with columns.
Why it's wrong here
Table output is not requested.
- ✓
A JSON array of strings.
Why this is correct
The query returns a list of three values in JSON array format.
- ✗
A JSON object with keys.
Why it's wrong here
The query returns an array, not an object.
Go deeper
Related to this question
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 →
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.