Amazon Simple Notification Service
- Amazon Simple Notification Service (SNS) is a one type of web service to send or receive notification instantly from the cloud.
- Using SNS you can create topic, subscribe topic, and send topic to end user application using a Protocol like https, http, and email. SNS use push and pull mechanism for this.
- SNS have some basic step to follow. First create topic. Here you need to give the name of the topic and it is essential to subscribe notification to the client or create notification. After you gave a name, you need to specify who can use it and which protocol you want to send. You can choose any one i.e. Https,http,email.add subscriber to a topic. And you can publish a message also which delivers to all.
- SNS can be used as application integration. SNS can be helpful in processing application order. Suppose one client comes and requests for something. Owner sends its request for payment verification and sends back that payment verification to all users, after it is completed successful.
- It can be helpful in big company where due to globalization one event that occurs in one place can be notified to all other employee in the world by sending message.SNS is also helpful in sending information that varies from time to time. Suppose you will send a message to a user to notify a new skim by message or you will send message to whom you are interested in particular topic like some group interested particular music. If a new music launches you can send message to all.SNS can be helpful in mobile application to deliver real time information like weather,sport,movie etc.
- SNS is simple to use as anyone can easily understand its process, it is more flexible as it provides choosing different protocol to send notification, it is also more reliable, as message can’t be lost because Amazon store messages on different centers.
- SNS is secures your message by choosing to whom to the send message; publish message or not etc.eventhough you can also encrypt it. Using SNS, you can publish a number of messages so in this way it is more reliable.
- Let’s check how to create topic and subscribe topic .
Step 1) Sign up for SNS service.go to http://aws.amazon.com/sns and click on sign up .
Figure 1: sign up
Next, sign up page appear like this.
Figure 2: enter email id and password
Step 2) After Sign in you can use its service. In the main AWS window you can see SNS tab. by clicking on it SNS main Window opens like this.
Figure 3: create new topic
Step 3) Click on create new topic then topic wizard opens.
Figure 4:give topic name
Provide name of topic. Here we have given “Techno Encyclopedia” name and click on create topic.
Step 4) When you create topic, in the main window it will display like this.
Figure 5:create subscription
Give topic ARN, topic owner, region information.
Step 5) Subscribe topic. for this click on Create new subscription.
Create New Subscription wizard open.
Figure 6: enter ARN ,protocol and end point
Here you need to provide Topic ARN, it should be the same as the topic ARN which you created above. Copy fit from topic property and paste here. Next is which protocol you need to use.HTTPs, HTTP, email etc.here we select Email and end point enter email address that you subscribe. Click on Subscribe.
Figure 7: acknowledgment
Shows a Subscription request received. And click on close. In main window it shows the subscription like this.
Figure 8:My subscription property
One Subscription property will display like this.
Step 8) Publish topic. For this Select your topic and main window, click on publish topic.
Figure 9: publish topic
Steps 9) Publish topic wizard opens. Provide Subject and message, click on Publish message.
Figure 10: Publish message
Step 10) It shows that message successfully published.
Figure 11: acknowledgment that message has been published.
Step 11) After message publishes and you want to delete a topic. For that, go to all topic action -> delete topic.
Figure 12) Process to delete topic
Step13) Select yes delete topic and your topic will be deleted.
- You now understand how to use SNS to publish topic, create topic and subscribe topic.
- SNS is a very cost effective as it takes minimum charge. First 100,000 requests are free and then $0.06 for 100,000 requests and this is same for HTTP/HTTPS notification. For email 1,000 emails are free then $2.00 for 100,000 email/email notification. It also dependent on data transfers and varies from region to region.