Bird
0
0

What output should you expect when running this AWS CLI command in a script?

medium📝 Predict Output Q4 of 15
AWS - CLI
What output should you expect when running this AWS CLI command in a script?
aws ec2 describe-instances --query 'Reservations[].Instances[].State.Name' --output text
AA list of instance states such as 'running', 'stopped', etc.
BA JSON object containing instance IDs and states
CAn error indicating invalid query syntax
DA list of instance IP addresses
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command

    The command uses 'describe-instances' to get EC2 instance details.
  2. Step 2: Analyze the query

    The query extracts the 'State.Name' property from each instance.
  3. Step 3: Output format

    The '--output text' option formats the output as plain text, listing states.
  4. Final Answer:

    A list of instance states such as 'running', 'stopped', etc. -> Option A
  5. Quick Check:

    Query extracts instance states, output is text list [OK]
Quick Trick: Query extracts specific fields; text output lists values [OK]
Common Mistakes:
  • Expecting JSON output instead of text
  • Misunderstanding the query syntax
  • Assuming IP addresses are returned

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes