StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Utilities
  3. Background Jobs
  4. Message Queue
  5. Amazon SNS vs Amazon SQS

Amazon SNS vs Amazon SQS

OverviewDecisionsComparisonAlternatives

Overview

Amazon SQS
Amazon SQS
Stacks2.8K
Followers2.0K
Votes171
Amazon SNS
Amazon SNS
Stacks1.4K
Followers1.2K
Votes18

Amazon SNS vs Amazon SQS: What are the differences?

Introduction

Amazon Simple Notification Service (SNS) and Amazon Simple Queue Service (SQS) are both messaging services provided by Amazon Web Services (AWS). They are designed to help developers build scalable, decoupled, and fault-tolerant applications.

1. Message Distribution Model:

Amazon SNS uses a publish-subscribe (pub/sub) messaging model, where a single message is delivered to multiple subscribed endpoints. On the other hand, Amazon SQS uses a distributed queuing model, where messages are stored in a queue and processed by consumers at their own pace.

2. Message Retention:

In Amazon SNS, messages are not retained. Once a message is published, it will be delivered to the subscribed endpoints, or discarded if the endpoints are not available. In contrast, Amazon SQS retains messages in a queue until they are explicitly deleted by the consumer.

3. Message Duplication:

Amazon SNS may deliver duplicate messages in certain failure scenarios, but it provides built-in support for deduplication using message attributes. On the other hand, Amazon SQS ensures that each message is delivered at least once and does not deliver duplicates, making it suitable for applications that require strict message ordering.

4. Subscription Protocols:

Amazon SNS supports various subscription protocols such as HTTP/HTTPS, email, SMS, Lambda, and more. It allows flexibility in reaching different types of endpoints. In contrast, Amazon SQS only supports messaging via HTTP/HTTPS.

5. Pricing Model:

Amazon SNS charges based on the number of messages published and the number of API requests made. Amazon SQS charges based on the number of messages transferred in and out of the queue, as well as the number of API requests made.

6. Message Fanout and Delivery Time:

Amazon SNS enables immediate message fanout to multiple subscribers, providing near-real-time message delivery. Amazon SQS, being a queue-based service, offers a delay feature to control the delivery time of messages.

In summary, Amazon SNS uses a pub/sub model, allows various subscription protocols, and incurs charges based on messages published, while Amazon SQS uses a queuing model, supports only HTTP/HTTPS messaging, and charges based on messages transferred.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Amazon SQS, Amazon SNS

MITHIRIDI
MITHIRIDI

Software Engineer at LightMetrics

May 8, 2020

Needs adviceonAmazon SQSAmazon SQSAmazon MQAmazon MQ

I want to schedule a message. Amazon SQS provides a delay of 15 minutes, but I want it in some hours.

Example: Let's say a Message1 is consumed by a consumer A but somehow it failed inside the consumer. I would want to put it in a queue and retry after 4hrs. Can I do this in Amazon MQ? I have seen in some Amazon MQ videos saying scheduling messages can be done. But, I'm not sure how.

303k views303k
Comments

Detailed Comparison

Amazon SQS
Amazon SQS
Amazon SNS
Amazon SNS

Transmit any volume of data, at any level of throughput, without losing messages or requiring other services to be always available. With SQS, you can offload the administrative burden of operating and scaling a highly available messaging cluster, while paying a low price for only what you use.

Amazon Simple Notification Service makes it simple and cost-effective to push to mobile devices such as iPhone, iPad, Android, Kindle Fire, and internet connected smart devices, as well as pushing to other distributed services. Besides pushing cloud notifications directly to mobile devices, SNS can also deliver notifications by SMS text message or email, to Simple Queue Service (SQS) queues, or to any HTTP endpoint.

A queue can be created in any region.;The message payload can contain up to 256KB of text in any format. Each 64KB ‘chunk’ of payload is billed as 1 request. For example, a single API call with a 256KB payload will be billed as four requests.;Messages can be sent, received or deleted in batches of up to 10 messages or 256KB. Batches cost the same amount as single messages, meaning SQS can be even more cost effective for customers that use batching.;Long polling reduces extraneous polling to help you minimize cost while receiving new messages as quickly as possible. When your queue is empty, long-poll requests wait up to 20 seconds for the next message to arrive. Long poll requests cost the same amount as regular requests.;Messages can be retained in queues for up to 14 days.;Messages can be sent and read simultaneously.;Developers can get started with Amazon SQS by using only five APIs: CreateQueue, SendMessage, ReceiveMessage, ChangeMessageVisibility, and DeleteMessage. Additional APIs are available to provide advanced functionality.
In most cases, developers can get started with Amazon SNS by using just three APIs: CreateTopic, Subscribe, and Publish. Additional APIs are available, which provide more advanced functionality.;With SNS you can publish a message once, and deliver it one or more times. So you can choose to direct unique messages to individual Apple, Google or Amazon devices, or broadcast deliveries to many mobile devices with a single publish request.;SNS allows you to group multiple recipients using topics. A topic is an “access point” for allowing recipients to dynamically subscribe for identical copies of the same notification. One topic can support deliveries to multiple endpoint types -- for example, you can group together iOS, Android and SMS recipients. When you publish once to a topic, SNS delivers appropriately formatted copies of your message to each subscriber.;Amazon SNS allows applications and end-users on different devices to receive notifications via Mobile Push notification (Apple, Google and Kindle Fire Devices), HTTP/HTTPS, Email/Email-JSON, SMS or Amazon Simple Queue Service (SQS) queues.;Amazon SNS provides access control mechanisms to ensure that topics and messages are secured against unauthorized access
Statistics
Stacks
2.8K
Stacks
1.4K
Followers
2.0K
Followers
1.2K
Votes
171
Votes
18
Pros & Cons
Pros
  • 62
    Easy to use, reliable
  • 40
    Low cost
  • 28
    Simple
  • 14
    Doesn't need to maintain it
  • 8
    It is Serverless
Cons
  • 2
    Has a max message size (currently 256K)
  • 2
    Difficult to configure
  • 2
    Proprietary
  • 1
    Has a maximum 15 minutes of delayed messages only
Pros
  • 12
    Low cost
  • 6
    Supports multi subscribers

What are some alternatives to Amazon SQS, Amazon SNS?

Kafka

Kafka

Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.

RabbitMQ

RabbitMQ

RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.

Celery

Celery

Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.

NSQ

NSQ

NSQ is a realtime distributed messaging platform designed to operate at scale, handling billions of messages per day. It promotes distributed and decentralized topologies without single points of failure, enabling fault tolerance and high availability coupled with a reliable message delivery guarantee. See features & guarantees.

OneSignal

OneSignal

OneSignal is a high volume push notification service for websites and mobile applications. OneSignal supports all major native and mobile platforms by providing dedicated SDKs for each platform, a RESTful server API, and a dashboard.

ActiveMQ

ActiveMQ

Apache ActiveMQ is fast, supports many Cross Language Clients and Protocols, comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4. Apache ActiveMQ is released under the Apache 2.0 License.

ZeroMQ

ZeroMQ

The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more.

Apache NiFi

Apache NiFi

An easy to use, powerful, and reliable system to process and distribute data. It supports powerful and scalable directed graphs of data routing, transformation, and system mediation logic.

Gearman

Gearman

Gearman allows you to do work in parallel, to load balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events.

Memphis

Memphis

Highly scalable and effortless data streaming platform. Made to enable developers and data teams to collaborate and build real-time and streaming apps fast.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase