Bird
0
0

What will be the output of this AWS CLI command run in a script?

medium📝 Predict Output Q13 of 15
AWS - CLI
What will be the output of this AWS CLI command run in a script?
aws ec2 describe-instances --query 'Reservations[*].Instances[*].InstanceId' --output text
AA list of instance IDs separated by spaces
BA JSON object with instance details
CAn error message about invalid query
DA count of running instances
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command components

    The command describes EC2 instances, queries only their IDs, and outputs as plain text.
  2. Step 2: Predict the output format

    With --output text, the instance IDs will be listed separated by spaces, not JSON or counts.
  3. Final Answer:

    A list of instance IDs separated by spaces -> Option A
  4. Quick Check:

    Query + text output = list of IDs [OK]
Quick Trick: Text output shows plain list, not JSON [OK]
Common Mistakes:
  • Expecting JSON output instead of text
  • Thinking it returns counts instead of IDs
  • Misreading the query syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes