AWS SQS is the most widely used message queue on AWS, powering everything from simple task queues to complex event-driven architectures. While the per-request cost seems trivial, high-throughput systems can generate billions of requests monthly. The way you poll, batch, and size messages determines whether SQS costs $10 or $1,000 per month.
TL;DR: Standard SQS costs $0.40 per million requests (first 1M free). FIFO costs $0.50 per million. Each 64 KB chunk of a message counts as a separate request. Long polling, batching (up to 10 messages per request), and using S3 for large payloads are the three biggest cost reducers.
SQS Request Pricing
| Queue Type | First 1M requests/mo | Beyond 1M |
|---|---|---|
| Standard Queue | Free | $0.40 per million |
| FIFO Queue | Free | $0.50 per million |
What Counts as a Request?
Every API call is a request: SendMessage, ReceiveMessage, DeleteMessage, ChangeMessageVisibility, GetQueueAttributes, etc.
Critical detail: Messages larger than 64 KB are billed as multiple requests. A 256 KB message = 4 requests (4 x 64 KB chunks).
Cost Breakdown by Operation
For a typical workflow processing 10 million messages/month:
| Operation | Requests | Cost |
|---|---|---|
| SendMessage (10M messages) | 10M | $4.00 |
| ReceiveMessage (10M polls) | 10M | $4.00 |
| DeleteMessage (10M deletes) | 10M | $4.00 |
| Empty receives (polling overhead) | 5M | $2.00 |
| Total | 35M | $14.00 |
Empty receives (polling when no messages are available) are often the largest hidden cost.
Data Transfer Costs
| Direction | Cost |
|---|---|
| Same Region | Free |
| Cross-Region | $0.01-$0.02/GB |
| To Internet | Standard data transfer rates |
SQS within the same region is free for data transfer, making it cost-effective for inter-service communication.
Cost Optimization Strategies
1. Use Long Polling
Short polling returns immediately (even when empty), generating wasteful empty receives. Long polling (up to 20 seconds) waits for messages, reducing empty receives by 90%+.
Set WaitTimeSeconds=20 on ReceiveMessage calls or configure it as a queue attribute.
2. Batch Operations
| Approach | Requests for 10M messages |
|---|---|
| Individual sends | 10M sends + 10M receives + 10M deletes = 30M |
| Batch of 10 | 1M sends + 1M receives + 1M deletes = 3M |
| Cost difference | $12.00 vs $1.20 (90% savings) |
SendMessageBatch and DeleteMessageBatch process up to 10 messages per request.
3. Keep Messages Under 64 KB
Messages over 64 KB are billed as multiple requests. For large payloads, store data in S3 and send only the S3 reference via SQS. The SQS Extended Client Library automates this.
4. Use Standard Queues When Possible
FIFO queues cost 25% more ($0.50 vs $0.40 per million). Only use FIFO when message ordering and exactly-once delivery are required.
Related Guides
- AWS SNS Pricing: Notifications, SMS, and Email
- AWS Lambda Pricing Guide
- AWS Step Functions Pricing: Standard vs Express
- AWS CloudWatch Pricing Guide
FAQ
How much does SQS cost for a typical application?
A moderately busy application processing 50 million messages/month with proper batching and long polling typically costs $8-15/month. Without optimization, the same volume can cost $60-80/month.
Is the SQS free tier enough for development?
Yes. The free tier covers 1 million requests/month permanently (not just the first 12 months). This is sufficient for development and low-traffic production workloads.
When should I use SQS vs EventBridge?
SQS is cheaper for point-to-point messaging and task queues. EventBridge ($1.00 per million events) is better for event routing to multiple targets. Use SQS for workload decoupling, EventBridge for event-driven architectures with multiple consumers.
Lower Your SQS Costs with Wring
Wring helps you access AWS credits and volume discounts to lower your SQS costs. Through group buying power, Wring negotiates better rates so you pay less per million requests.
