Where your messages are kept
Queues run on the platform, not on machines of yours; this page says where messages are stored, what happens in the background, and which numbers are approximate.
What runs where
No machine of yours is involved. A queue and its messages are stored in the platform's own database in the queue's region, shared with other organizations' queues; the limits in Quotas keep one organization's traffic from slowing the others. The queue API and the SQS endpoint are two doors to the same service, so limits, delivery and dead-letter rules are the same through both.
What happens in the background
Once a minute, the platform:
- removes messages whose retention has run out;
- moves messages that have used up their receives to their dead-letter queue, for every queue that has one, so the dead-letter counts are right even when nobody receives (a receive also does this for its own queue first);
- records each queue's available, in-flight and delayed counts for the Messages over time chart.
A redrive runs inside the request that starts it, and answers when it has finished.
Long polling
A waiting receive is woken at once by a send through the same server; otherwise it looks for new messages every second until its wait is up. It stops when the client disconnects.
Approximate numbers
- The checks for messages per queue, in-flight messages per queue and stored bytes per organization use counts that are up to a few seconds old. A burst can go slightly over a limit before requests are refused.
- The request rate and the open long polls are counted by each of the platform's servers on its own, so your organization can get somewhat more than the stated rate.
- Request counts for billing are collected every 10 seconds; requests counted by a server that stops in between are not billed.