AWS Certified SysOps Administrator – Associate (legacy) — Question 266
A user has created a queue named `myqueue` with SQS. There are four messages published to queue which are not received by the consumer yet. If the user tries to delete the queue, what will happen?
Answer options
- A. A user can never delete a queue manually. AWS deletes it after 30 days of inactivity on queue
- B. It will delete the queue
- C. It will initiate the delete but wait for four days before deleting until all messages are deleted automatically.
- D. It will ask user to delete the messages first
Correct answer: B
Explanation
When you delete an Amazon SQS queue, the deletion process occurs immediately and removes all messages currently in the queue, regardless of their consumption status. There is no requirement to empty or purge the messages before executing the deletion. Therefore, attempting to delete the queue will succeed immediately without waiting or prompting for message removal.