Resources Required to Process Messages

To help you estimate the amount of resources needed to process your queued messages, Amazon SQS can provide you with an approximate number of messages in a queue.

[Important]Important

Because of the distributed architecture of SQS, we do not have an exact count of the number of messages in a queue; the value we provide is our best guess. In most cases it should be close to the actual number of messages in the queue, but you should not rely on the count being precise.

The table below lists the API actions to use.

To do this... Use this action for Query or SOAP Use this action for REST

Get the approximate number of messages in the queue

GetQueueAttributes

Currently not supported. Use the Query action.