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.
-Topic can either be standard or FIFO, we are using standard, then click create topic.
-Create subscription
-We are going to create an email subscription
-The subscription was sent to the endpoint email and I needed to confirm the subscription.
-To test if it works, we are going to publish a message
-Going back to my email, lets see what we got
This validates that the SNS is working as intended.
Till you read from me again, don't forget to clean up your resources.
Cheers!!!
Top comments (0)