Bird
0
0

What will be the output of this AWS CLI command?

medium📝 service behavior Q5 of 15
AWS - SNS and SQS
What will be the output of this AWS CLI command?
aws sqs get-queue-attributes --queue-url https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue --attribute-names ApproximateNumberOfMessages
AReturns the approximate number of messages available for retrieval
BReturns the exact number of messages in the queue
CReturns the list of all messages in the queue
DDeletes all messages from the queue
Step-by-Step Solution
Solution:
  1. Step 1: Understand get-queue-attributes Command

    This command fetches attributes of the queue, here specifically ApproximateNumberOfMessages.
  2. Step 2: Interpret the Attribute Meaning

    ApproximateNumberOfMessages gives an estimate of messages available, not exact count or message contents.
  3. Final Answer:

    Returns the approximate number of messages available for retrieval -> Option A
  4. Quick Check:

    ApproximateNumberOfMessages = approximate count [OK]
Quick Trick: ApproximateNumberOfMessages gives estimated message count [OK]
Common Mistakes:
MISTAKES
  • Expecting exact message count
  • Thinking it returns message contents
  • Confusing with delete operation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes