SQS and SNS Cost Optimization: Eliminating the Quiet Six-Figure Bill
SQS and SNS look like free services until your monthly bill includes a $40K messaging line. The good news is that the levers are cleaner than almost any other AWS service. The bad news is that almost no engineering team pulls them by default.
We have seen seven-figure annual messaging spend at enterprise customers, almost always because no one is sizing batches, polling intervals, or message attributes. The optimisation playbook is short, mechanical, and routinely cuts 50 to 80 percent off the bill within 30 days. None of it requires a negotiation, although the residual line item still belongs in your EDP scope.
The pricing model in 90 seconds
SQS prices per request, not per message. Standard queues cost approximately $0.40 per million requests. FIFO queues cost approximately $0.50 per million requests. SNS Standard topics cost approximately $0.50 per million publishes. SMS, email, and HTTP delivery have separate per-message rates.
A request is not a message. A SendMessageBatch with 10 messages is one request. A ReceiveMessage with empty result is still one request. This is the entire optimisation point.
The seven optimisations that cut 80% of bills
1. Use long polling
Default ReceiveMessage with short polling (WaitTimeSeconds=0) returns immediately. A consumer in a tight loop generates millions of empty receive requests per day. Setting WaitTimeSeconds=20 reduces empty polls by orders of magnitude.
Calculation: a consumer polling at 100 ms intervals generates 864,000 empty receives per day, or $0.35/day per consumer. 100 consumers is $35/day, or $12,775/year. Switching to 20-second long polling drops this to 4,320 polls per day, or roughly $63/year for the same 100 consumers.
2. Batch sends and receives
SendMessageBatch and ReceiveMessage with MaxNumberOfMessages=10 cut request count by 10x for the same throughput. The default of MaxNumberOfMessages=1 is the single most common mistake.
3. Use FIFO only when ordering or deduplication is required
FIFO is 25% more expensive per request and capped at 300 messages per second per group without high-throughput mode. Many teams default to FIFO out of caution. If your consumer can tolerate occasional duplicates or out-of-order delivery, Standard is the right choice.
4. Right-size message payloads
SQS bills messages above 64 KB as multiple 64-KB chunks. A 256-KB message counts as 4 requests. Use Amazon S3 with the Extended Client Library for messages above 64 KB; you pay S3 storage but eliminate the request multiplier.
5. Use SNS message filtering
Without filtering, every SNS subscriber receives every message, multiplying delivery cost. SNS message filtering moves the filter to the SNS side; subscribers only receive messages matching their filter policy. For fan-out topics with 5+ subscribers, filtering routinely cuts delivery cost in half.
6. Switch fan-out to SNS-to-SQS with filtering
Direct multi-subscriber SNS topics often deliver to 10+ HTTP or Lambda endpoints. Each delivery is a billable event. Restructuring to SNS-to-SQS with filtering on the SQS side moves the cost from per-subscriber delivery to per-batch consumption.
7. Use EventBridge Pipes for cross-service routing
EventBridge Pipes can replace patterns that previously required SNS-to-Lambda-to-SQS chains. The reduced hop count means fewer request-billed services in the path.
FIFO high-throughput mode versus Standard
Standard FIFO is capped at 300 messages per second per message group. The high-throughput mode (FIFO with per-message-group deduplication) lifts the cap to 70,000 messages per second per region but does not change per-request pricing.
Decision: if you need FIFO semantics and throughput above 300 msg/sec per group, high-throughput FIFO is the right answer. The pricing is the same as standard FIFO. The only constraint is regional support.
Cross-region replication costs
Neither SQS nor SNS have native cross-region replication. Common DIY patterns:
- SNS topic in each region with a Lambda bridge. Lambda invocations and inter-region data transfer add cost. Typically $0.02/GB transfer plus per-invocation cost.
- EventBridge cross-region buses. $1 per million events per direction.
- Self-replicated SNS to SQS to consumer in destination region. Adds two billable layers but offers control.
For most customers, cross-region replication is the single most expensive messaging line item. Decide whether you need it before architecting it.
Dead-letter queues and retention
DLQs are free to create but bill normally for messages held and retrieved. Common mistakes:
- DLQ retention set to 14 days (maximum) on a queue that gets 1M messages/day means $5.60/day in held-message billing.
- DLQ monitoring CloudWatch alarm set to ApproximateNumberOfMessagesVisible polls every minute. Adds CloudWatch metric cost.
- DLQ messages never reprocessed, so storage cost grows without bound until retention purges them.
Set DLQ retention to the shortest period your incident response can tolerate, typically 1 to 4 days.
SNS SMS pricing trap
SMS delivery prices vary by destination country and can be 100x to 1000x the cost of email or HTTP delivery. A US SMS costs roughly $0.00645; a Saudi Arabian SMS roughly $0.0828. A global notification topic with 10,000 subscribers split across countries can produce wildly variable monthly bills.
Best practice: set SNS spending limits per region and per topic. Use email or push notification channels by default and gate SMS behind a user preference.
CloudWatch metrics and logs costs
Each SQS queue and SNS topic publishes 14 to 18 CloudWatch metrics by default. CloudWatch metric pricing is per metric per month. With 1,000 queues, you have 14,000 to 18,000 metrics, or roughly $200 to $250 per month in metric charges alone. Most teams ignore this until it surfaces in a billing review.
EDP overlay
SQS and SNS roll into general messaging spend in an EDP. Standard EDP discounts apply to per-request rates. For customers above $50K per month in messaging spend, AWS may offer private pricing on a per-million-request basis if specifically requested. AWS sellers will not surface this proactively.
Action checklist
- Inventory every SQS queue and SNS topic. Record current request rate, batch size, polling interval.
- Set ReceiveMessage WaitTimeSeconds to 20 on every queue.
- Set MaxNumberOfMessages to 10 on every consumer.
- Audit FIFO queues; convert to Standard where ordering is not required.
- Move messages above 64 KB to S3 with the Extended Client Library.
- Apply SNS message filtering to multi-subscriber topics.
- Set DLQ retention to the minimum your operations team can tolerate.
- Scope messaging line items in your next EDP cycle.
- Contact our advisory team for a messaging audit benchmarked against $2.4B+ of reviewed AWS spend.
See our AWS serverless cost guide, EventBridge cost analysis piece, and Lambda pricing optimization guide for the broader serverless cost picture.
SQS retention and message lifecycle
SQS messages persist in a queue until consumed or until retention expires. The default retention is 4 days; maximum is 14 days. Held messages do not bill directly, but the cost emerges in three ways:
- DLQ messages held at maximum retention. When dead-lettered messages accumulate, every reprocessing attempt is billable.
- Approximate message count alarms. CloudWatch metric polling on ApproximateNumberOfMessagesVisible adds per-metric cost.
- Consumer code that polls but does not process. Empty receives still count as billable requests.
Set retention to the minimum your operations team can tolerate, typically 1 to 2 days for production queues, 4 hours for high-throughput transactional queues.
Cross-account SQS access patterns
Cross-account SQS access via resource-based policies does not introduce additional charges beyond standard request pricing. However, common cross-account patterns introduce hidden cost:
- SQS in account A consumed by Lambda in account B: standard cross-account, no extra charge.
- Cross-region SQS consumption: data transfer at $0.02/GB applies if consumer is in a different region.
- Cross-account VPC endpoint usage: VPC endpoint hourly charges apply.
For multi-account architectures, consolidating queues to a "messaging hub" account simplifies billing and often reduces total cost.
SNS subscription cost mechanics
SNS Standard topic publishes cost $0.50 per million. But the delivery to subscribers has separate pricing depending on the delivery protocol:
| Delivery protocol | Cost per million |
|---|---|
| SQS | Free (SQS billing applies on the receiving side) |
| Lambda | Free SNS delivery, Lambda invocation costs apply |
| HTTP/HTTPS | $0.60 per million |
| Email/Email-JSON | $2.00 per 100,000 |
| SMS | Variable, by destination (see SNS SMS section) |
| Mobile push (APNS, FCM) | $0.50 per million |
| Kinesis Data Firehose | $0.50 per million |
Fan-out architectures with 10+ HTTP subscribers can incur larger HTTP delivery costs than the topic publish itself. Move HTTP subscribers to SQS-mediated patterns where possible.
FIFO message group strategy
FIFO message groups exist to provide ordering within a logical partition. Each message group is rate-limited to 300 messages/second in standard FIFO mode and 70,000 messages/second in high-throughput FIFO mode.
Common mistake: using a single message group for an entire queue, which caps throughput at 300/sec regardless of consumer scale. The fix: choose a message group ID that partitions your traffic (customer ID, account ID, order ID), enabling per-group ordering with overall queue throughput limited only by consumer scale.
SQS plus EventBridge architectural choice"
EventBridge is often a substitute for SNS fan-out patterns. EventBridge bills $1 per million events with filtering applied; this is roughly 2x SNS plus SQS plus filtering. The break-even depends on subscriber count:
- 1 to 3 subscribers: SNS plus SQS is cheaper.
- 5+ subscribers with selective filtering: EventBridge often cheaper.
- 10+ subscribers with complex routing: EventBridge almost always cheaper.
The architectural simplicity of EventBridge often justifies the modest premium even when SNS would be cheaper on paper.