SAP-C02 --query parameter Practice Question
Network Topology
Refer to the exhibit. A solutions architect runs this CLI command but receives an error: 'Unknown options: --query'. What is the most likely cause?
⚠ Common exam trap
The 'Unknown options: --query' error is most commonly caused by an outdated AWS CLI version that does not support the --query parameter, not by a missing --output parameter. Candidates often incorrectly assume that --query requires explicit --output specification.
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 AWS CLI version is outdated.
The 'Unknown options: --query' error occurs when the AWS CLI version is outdated and does not recognize the --query parameter. The --query parameter was introduced in AWS CLI version 1.6.0. If the CLI version is older, it will treat --query as an unknown option. While it is true that --query often requires --output for proper formatting, the error for missing --output would be different, not 'Unknown options'. Therefore, the most likely cause is an outdated AWS CLI version.
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 --filters parameter is incorrectly formatted.
Why it's wrong here
The --filters parameter is incorrectly formatted. This would produce a different error related to the filter syntax, not an 'Unknown options' error for --query.
- ✗
The --query parameter is used without specifying --output.
Why it's wrong here
This is incorrect. The error 'Unknown options' indicates the parameter itself is not recognized, not that a required parameter is missing. Using --query without --output would result in a different error about missing output format, or in some cases, it might work with default output. Therefore, missing --output is not the most likely cause.
- ✗
The tag value is missing.
Why it's wrong here
The tag value is missing. This would produce an error about missing required parameters, not an 'Unknown options' error.
- ✓
The AWS CLI version is outdated.
Why this is correct
This is correct. Outdated AWS CLI versions do not support the --query parameter. If the version is older than 1.6.0, --query is not a known option, leading to the 'Unknown options' error. Upgrading the AWS CLI resolves the issue.
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 1,660-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.