SNS (Simple Notification Service) is a distributed publish-subscribe service.
SQS (Simple Queue Service) is distributed queuing service.
Differences:
Choose SNS if:
You would like to be able to publish and consume batches of messages. You would like to allow same message to be processed in multiple ways. Multiple subscribers are needed.
Choose SQS if:
You need a simple queue with no particular additional requirements. Decoupling two applications and allowing parallel asynchronous processing. Only one subscriber is needed.
https://medium.com/awesome-cloud/aws-difference-between-sqs-and-sns-61a397bf76c5
The Fanout scenario is when a message published to an SNS topic is replicated and pushed to multiple endpoints, such as Kinesis Data Firehose delivery streams, Amazon SQS queues, HTTP(S) endpoints, and Lambda functions. This allows for parallel asynchronous processing. https://docs.aws.amazon.com/sns/latest/dg/sns-common-scenarios.html
With Amazon SNS, you have the ability to send push notification messages directly to apps on mobile devices. Push notification messages sent to a mobile endpoint can appear in the mobile app as message alerts, badge updates, or even sound alerts. https://docs.aws.amazon.com/sns/latest/dg/sns-mobile-application-as-subscriber.html
In a big application with many parts working together, a queue system like SQS helps by:
Overall, using SQS helps make the application work better together, handle more work, and keep things running smoothly.
SNS Javascript SDK
SQS Javascript SDK
This all seems really complicated, I’m just hoping to be able to hold on.