Skip to content

Instantly share code, notes, and snippets.

@AgilanVageesan
Created March 13, 2025 16:21
Show Gist options
  • Select an option

  • Save AgilanVageesan/f52931a2c0f3d62c9596ece1e0cf8f6f to your computer and use it in GitHub Desktop.

Select an option

Save AgilanVageesan/f52931a2c0f3d62c9596ece1e0cf8f6f to your computer and use it in GitHub Desktop.

📊 Amazon SQS vs. SNS vs. Kinesis - When to Use What

Feature Amazon SQS Amazon SNS Amazon Kinesis
Best For Message queuing Event notifications Real-time data streaming
Message Delivery Pull-based Push-based Streaming
Use Case Decoupling microservices Broadcasting messages Processing live data (IoT, logs, analytics)
Ordering FIFO available No ordering guarantee Ordered per shard
Scalability High High Infinite scaling
Retention Min: 1 minute, Max: 14 days No retention (immediate delivery) Min: 24 hours, Max: 365 days
Duplication Handling May require deduplication No built-in deduplication Handled at the shard level
Latency Milliseconds to seconds Near real-time Near real-time

✅ Use SQS if you need reliable, queued message processing.
✅ Use SNS if you need instant message broadcasting.
✅ Use Kinesis if you need real-time data analytics.


⚠️ Constraints & Limitations Table

Service Min & Max Message Size Min & Max Retention Period Ordering Throughput Limitations Additional Constraints
SNS Min: 1 byte, Max: 256 KB No retention (immediate delivery) No guaranteed ordering High throughput SMS costs vary by region, HTTP delivery retries up to 27 hours
SQS Min: 1 byte, Max: 256 KB Min: 1 minute, Max: 14 days FIFO available FIFO queues limited to 300 TPS (higher with batching) Message delay max 15 mins, extended client needed for larger messages
Kinesis Min: 1 byte, Max: 1 MB per record Min: 24 hours, Max: 365 days Ordered per shard 1 MB/sec input & 2 MB/sec output per shard Scaling requires manual shard management, cost increases with more shards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment