SNS vs SQS? AWS Messaging Services - Know the difference
Tags: aws, beginners, architect, career
Published: 2019-05-14 01:41:56

---
title: SNS vs SQS? AWS Messaging Services - Know the difference
published: true
description: 
tags: aws, beginners, architect, career
---

I noticed [Helen](https://dev.to/helenanders26) released this good DEV.to post on SNS and SQS and I happen to have a video of the same nature lying around and thought I'd upload it to provide an explanation from a different perspective.

{% link https://dev.to/helenanders26/aws-series-sns-sqs-or-both-4ihd %}

### A little bit more about Message Services

The 4 most important services you need to know when it comes to **Application Integration** are the following:

* SNS - PubSub (think pass along)
* SQS - Queueing (think batch)
* Kinesis - Real-time
* SWF - Queuing but with people

For the Solution Architect Associate and Certificated Cloud Practitioner you really need to know the difference between SNS and SQS.


### MKS - Amazon Managed Streaming for Kafka

![](https://thepracticaldev.s3.amazonaws.com/i/fqvj5f39x1uyc8aopmmv.png)

Most companies in BigData who want to use real-time messaging systems tend to use Kafka. Luckily AWS has a managed service called MKS (Managed Kafka Service). 

### Kinesis

![](https://thepracticaldev.s3.amazonaws.com/i/ureov4khv5rygzy4gicu.png)

The use case for Kinesis has been really good for gaming where you need a simple streaming queue. There is a Solutions Architect Professional exam question which asks how you would ingest millions of events from IoT game devices to then insert into a database such as DynamoDB to update a scoreboard, and so Kinesis is what you would keep in mind.

At ExamPro we built our own real-time event tracking (think GoogleAnalytics) so we can accurately track and improve how people learn on our platform.

#### SNS - Amazon Simple Notification Service

![](https://thepracticaldev.s3.amazonaws.com/i/755hvaa221tqj4o5kcc7.png)

SNS is commonly used for sending simple internal emails. So for example when someone sign-ups on ExamPro I use the AWS SDK to send a message to an SNS topic which then sends me a plain text email.

Another way we use SNS is to trigger webhooks in your application. So for example, let us say you have a web-app which needs to extract data out of a PDF so you need to use a PDFTK which you have to run in a custom runtime in a Lambda function because of legacy reasons. When that lambda has processed that pdf you want to notify your web-app to tell the user it's done. You can have Lambda tell SNS which will then send an HTTP request to an api endpoint (webhook) to your web-app which will then update the user that the pdf has finished processing.

### SQS - Amazon Simple Queue Service 

![](https://thepracticaldev.s3.amazonaws.com/i/ybebqaquoyr18wgan9uv.png)

When we send out an email such as confirmation or reset password on ExamPro we use SQS to decouple email sending from our app so it doesn't cause the app to hang. ExamPro is a Rails app and so this gem called Shoryuken makes it really easy to start working with SQS will little knowledge.

{% github https://github.com/phstc/shoryuken %}

### SWF

Nobody I know uses this service. It's used by AWS I believe to help coordinate a sequence of tasks with people and services which makes sense for Amazon when they need to have humans put things into boxes and then ship those boxes.

There isn't even a new AWS icon. I've never been able to figure out how to access this service. It shows up on exams.


### Help me out make more free content

If you like this kind of AWS content the way you can help me out is adding me to [Linked In](https://www.linkedin.com/in/andrew-wc-brown) and endorsing my skill for AWS. You should add me anyway I love connecting with people on DEV.to