SQS vs SNS cost: how to compare messaging unit economics
Start with a calculator if you need a first-pass estimate, then use this guide to validate the assumptions and catch the billing traps.
SQS vs SNS cost comparisons go wrong when you compare list prices without normalizing the workload. The winner is usually decided by how many deliveries happen, how many requests per message you create, and whether retries are controlled.
Normalize the workload first (same flow, same assumptions)
Before you compare costs, write down one concrete message flow (producer -> routing -> consumers) and count how many operations happen per published message. Do this for a baseline and a peak scenario (deploys, incidents, backfills).
What to model
- Messages per month
- Fan-out (subscribers per message) for SNS
- Requests per message (receive, delete, visibility timeouts) for SQS
- Retries and failure rate
- Payload size and any transfer fees
Fast baseline (use calculators, then refine)
Keep the estimate honest by saving two scenarios: baseline traffic and peak traffic. Messaging cost spikes are usually driven by retries and fan-out, not by slow organic growth.
Worked comparison template (copy/paste)
- Published messages/month = producer volume (baseline + peak)
- SNS deliveries/month = published messages/month * subscribers per message * (1 + delivery retry factor)
- SQS requests/month = messages delivered to queues/month * requests per message (Send + Receive + Delete + extras)
When SNS costs spike
- High fan-out: deliveries multiply fast.
- Retries/redelivery loops: failures multiply deliveries.
- Verbose delivery targets: multiple protocols/targets per message increase total delivery count.
When SQS costs spike
- Multiple receives per message due to timeouts and visibility settings.
- High retry counts and poison-message loops.
- Backfills and replays that keep re-queueing the same payloads.
Common decision pitfalls (cost and architecture)
- Comparing one-to-many fan-out (SNS) against one-to-one processing (SQS) without normalizing deliveries.
- Ignoring consumer behavior: visibility timeouts and retries often matter more than list price.
- Forgetting downstream costs: Lambda, logging, and data transfer can dominate the messaging line item.
- Using one "average" and missing peaks. Spikes drive real bills and real outages.
How to validate the comparison
- Pull one week of real publish/delivery metrics and scale to monthly as a sanity check.
- Confirm retry behavior: delivery retries (SNS) and receive retries (SQS) are modeled as explicit multipliers.
- Verify payload size assumptions with logs (bytes per message and batch size in consumers).
Next: Estimate SQS requests, Estimate SNS deliveries.