Bird
0
0

What will be the output of this command?

medium📝 Predict Output Q5 of 15
AWS - CLI
What will be the output of this command?
aws ec2 describe-instances --query 'Reservations[].Instances[].InstanceId'
AA list of all S3 bucket names
BA list of all EC2 instance IDs in your account
CDetails of all EC2 instances including IP addresses
DAn error because the query syntax is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command and query

    The command describes EC2 instances and the query extracts only the InstanceId fields.
  2. Step 2: Match output with options

    A list of all EC2 instance IDs in your account correctly states the output is a list of instance IDs. An error because the query syntax is invalid is wrong because the query syntax is valid. Options A and C describe unrelated outputs.
  3. Final Answer:

    A list of all EC2 instance IDs in your account -> Option B
  4. Quick Check:

    Query extracts InstanceId list [OK]
Quick Trick: Use --query to filter AWS CLI output fields [OK]
Common Mistakes:
  • Assuming query syntax is invalid
  • Expecting full instance details instead of IDs
  • Confusing EC2 with S3 outputs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes