DEV Community

Cover image for Walkthrough on AWS Simple Notification Service(SNS)
Opeyemi Jokanola
Opeyemi Jokanola

Posted on

1

Walkthrough on AWS Simple Notification Service(SNS)

Have you ever wondered how one single message is received by millions subscribed to a service? The magic lies in one of AWS's services called SNS. This can be directly integrated for email notification, fraud service, shipping service, SQS queue. Subscribers to this service will get all the messages at once and one topic can reach up to 12 million subscribers. With SNS- emails, SMS, and mobile notifications can be sent directly. In addition, messages can be sent to Lambda, SQS, Kinesis Data Firehose and HTTP endpoints. SNS integrates seamlessly with other AWS services such as AWS budgets, CloudFormation, Cloudwatch alarms, ASG, S3 etc.

There are two ways you can use the SNS;
-Topic publish using SDK by creating a topic, subscription and publishing to the SNS topic
-Direct publish for mobile Apps SDK which involves creating platform application and platform endpoint, then publishing to platform endpoint.

In terms of security, SNS uses in-flight encryption, at-rest encryption using KMS keys, and client-side encryption.

Let's take a practical approach to SNS
-Navigate the console to the SNS service to create a topic, then click on the next step.

Image description
-Topic can either be standard or FIFO, we are using standard, then click create topic.

Image description

Image description

Image description

-Create subscription

Image description

-We are going to create an email subscription

Image description

-The subscription was sent to the endpoint email and I needed to confirm the subscription.

Image description

Image description

Image description

-To test if it works, we are going to publish a message

Image description

Image description

-Going back to my email, lets see what we got

Image description

This validates that the SNS is working as intended.

Till you read from me again, don't forget to clean up your resources.
Cheers!!!

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay