Simple Notification Service (SNS)
SNS is integrated into many AWS services. We are able to use it to receive notifications when events occur in our AWS Environment. With CloudWatch and SNS a full environment monitoring solution could be created that notifies administrators of alerts, capacity issues, downtime, changes in the environment, and more!
- TOPIC: A topic what a “message is sent to”
- Subscription end point: SNS sends all messages to subscriptions subscribed to a specific topic
- Subscriber end points include the following
- Application, Mobile APP notifications (IOS/Android/Amazon/Microsoft)
- SMS
- HTTPS
- HTTP
- JSON
- E–‐Mail JSON
- SQS Queue
- AWS Lambda
- Remember SNS is PUSH , but SQS ( For Queue) is PULL
Step 1) We will create a TOPIC. Call it “A picture was uploaded to S3 buckets”
Step 2) lets create a Subscription, in here we will use protocols “e-mail”
The choice of Protocols are:
- HTTP
- SMS
- HTTPS
- JSON
- E–‐Mail JSON
- SQS Queue
- AWS Lambda
- Application
Step 3) Then insert your e-mail in here :
Step 4) Now As we see it is pending, so go to above e-mail and then accept subscription; then you need to confirm subscription
Step 5) Now when I go back to AWS SNS, I will see new Subscription ID
Step 6) Now if you need to add another Subscription; you can click Subscription; then chose Mobile phone ( to get txt) and provide your cell phone number.
Step 7) Now I will test it by sending a Publish to this topic; Via Myself, remember I can use the notification also when I trigger some events.
Step 8) Now that all is OK, I will go to S3 and create a Buckets and have a trigger a SNS3 to e-mail when I get a file uploaded to the S3
Step 9) Go to S3 and create this Buckets “testswithsns” with all default value
Step 10) Then go to properties of that buckets and click on the events
Step 11) Pick the event = “Object create”, As you see when you want select it: you have choices SNS topic, SQS Queue or Lambda Function
Step 12) I pick SNS and pick the topic I did on the first steps called “whenAfileisuplaodedtoS3 “
Step 13) Now when I upload pictures to my S3 buckets I will see notifications.
Want more information on how to become Amazon AWS Certified? Learn more!