| Did this page help you? Yes No Tell us about it... |
Topics
This section describes the basic properties of Amazon SQS queues, identifiers for queues and messages, how you determine the general size of the queue, and how you manage the messages in a queue.
A queue can be empty if you haven't sent any messages to it or if you have deleted all the messages from it.
You must assign a name to each of your queues (for more information, see Queue URLs). You can get a list of all your queues or a subset of your queues that share the same initial characters in their names (for example, you could get a list of all your queues whose names start with "T3").
You can delete a queue at any time, whether it is empty or not. Be aware, however, that queues retain messages for a set period of time. By default, a queue retains messages for four days. However, you can configure a queue to retain messages for up to 14 days after the message has been sent.
Amazon SQS can delete your queue without notification if one of the following actions
hasn't been performed on it for 30 consecutive days:
SendMessage, ReceiveMessage,
DeleteMessage, GetQueueAttributes, SetQueueAttributes, AddPermission, and RemovePermission.
![]() | Important |
|---|---|
It is a violation of the intended use of Amazon SQS if you repeatedly create queues and then leave them inactive, or if you store excessive amounts of data in your queue. |
The following table lists the API actions to use.
| To do this... | Use this action |
|---|---|
|
Create a queue | |
|
Get the URL of an existing queue | |
|
List your queues | |
|
Delete a queue |