• Home
  • AWS
  • Amazon Simple Notification Service (AWS SNS)

Amazon Simple Notification Service (AWS SNS)

  • (4.0)
  • | 3547 Ratings

Amazon Simple Notification Service (AWS SNS)

The developers while building a technological solution to build highly functional and structurally complex applications that support their business objectives providing the instant event messaging facility. 

For example: When a subscriber expresses interest to know about certain topics or procedure of business operation, the company publishers send the relevant information immediately. 

What are the unique features of AWS SNS?

  • The users can push messages to Windows, Google, Apple kind of smart devices along with IoT devices. 
  • One can send messages for multiple times to any number of recipients directly. 
  • One gets immediate notifications on errors occurred in the system. 
  • Integrating and providing access indirectly with an external system. 
  • Send duplicate messages to n, no of devices associated. 
  • If the size of the message is more than the required, SNS does not cut the words and push, instead, it   sends the whole message limiting its push action to 1600 bytes
  • It also manages pub/sub messaging service where the event is notified immediately when there are changes made in an independent building block made to form a single application.

How SNS works?

The company owns the topics along with giving access permissions to the topic.  Subscribers are clients registered who wanted to receive notifications on specific topics that interest them.

Publishers send messages to topics. SNS matches the topic with the list of subscribers interested in the topic and delivers the message to each and every one of them. Here’s how it all fits together:


What are the main functions operating in AWS SNS

The SNS API has a certain list of functions making the whole operation successful.:

1.CreateTopic function -creates a new topic.

Topics are groups of events or access points prepared for identifying a specific subject or content. Each topic is given with a unique reference identifier (URI).  Topic names are  256 characters log written in upper and lower case letters combined with numbers, and hyphens. A user can create 100,000 distinct topics. Create a topic in the Amazon SNS console,

Create Topic function

 2. AddPermission function - establish the access permissions on the Topic  
These are in the form of a statement. They act as access control policies on each topic.

sns-add-permission TopicArn  //  the statement of access policy// 
--aws-account-id  value[,value...]  // the users to whom the statement should apply// 
--action-name value[,value...]  //actions to which the users should be granted access//
--label  value   //unique short name for the new policy statement.//

3. The Subscribe function - expresses the interest in receiving messages on a particular topic.

Create Subscription

4. The Publish function to post messages.

Publish a Message

Frequently Asked Amazon Web Services Interview Questions

How much do these solutions cost?

AWS SNS provides pay-as-you-go-pricing with no upfront installation charges. It is free for the first 100,000 SNS requests per month, first 1000,000 HTTPS notifications and the first 1,000 email notifications. More details on pricing are given in SNS page.

What are a different type of Operations provided in AWS SNS?

Operator Name
Create a Topic
To create a Topic
Delete Topic
Deleted previous Topic
List Topic
Provides list of topics associated to a User
SetTopic Attributes
You can set, update, modify attributes to a publisher. subscriber
Set, Update,Modiy attributes on Topic
To view an attribute.
Add & Remove Permission
For access control permissions
List Subscribers

What are the limitations to AWS SNS?

  1. It supports a message of size 256kb only or up to 140 bytes.
  2. When a message is not delivered immediately, the messages are held in a queue which is called as a dead-letter queue. AWS SNS does not support this system.
  3.  Data retention - storing the data records for business purposes is not supported by AWS SNS.
  4. FIFO ( First in First Out) of message ordering system is not supported by AWS SNS.
  5. Does not support two-way SMS feature.
  6. Amazon SNS cannot determine a delivery model as a mobile phone, VOIP or landline
  7. It does not even support scheduled message delivery feature

How to send a message to a Mobile number?

You can send SMS from your  AWS Management Console account or one of AWS SDKs. Both support Promotional messages for marketing and Transactional messages that support customer interactions and transactions. 

Using Amazon Console,

  • Sign in to
  • Select the geographical region you want to send the message.
  • Choose Message Type from Text Messaging Tab.
  • Type the Number, Message or Custom ID of the sender 
  • Send the Message.

Using AWS SDK, 
Use the following syntax 
Map smsAttributes =
        new HashMap();
smsAttributes.put("AWS.SNS.SMS.SenderID", new MessageAttributeValue()
        .withStringValue("mySenderID")   //The sender ID shown on the device.
smsAttributes.put("AWS.SNS.SMS.MaxPrice", new MessageAttributeValue()
        .withStringValue("0.50") //Sets the max price to 0.50 USD.
smsAttributes.put("AWS.SNS.SMS.SMSType", new MessageAttributeValue()
        .withStringValue("Promotional") //Sets the type to messagel.

How to send a message to HTTP endpoints?

Subscribe an HTTP or HTTPS endpoint by following the steps below.

  1. Sign in to the AWS Management Console and open the Amazon SNS console at
  2. Click Topics to select the topic.
  3. Click the Other actions drop-down list and select Subscribe to a topic.
  4. In the Protocol drop-down list, select HTTP or HTTPS.
  5. In the Endpoint box, paste in the URL for the endpoint that you want the topic to send messages to and then click Create Subscription.
  6. For the Subscription request received! a message, click Close.
  7. Your Subscription ID displays. 

You can also provide Delivery retry policy to SMS if failed to deliver in the first attempt. However, by default, AWS SNS makes 3 attempts to deliver a message.

You can also give access permissions to publish or send a message to your end users by defining a control access policy to the topic or to the user ID.

And finally, open the Amazon SNS console at

  • Click Topics and select a Topic.
  • Click the Publish to a topic button.
  • In the Subject box, enter a subject (for example, Inbound Marketing Course with Internship)
  • In the Message box, enter the message
  • Click the Publish message.

Explore AWS Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

Amazon SNS console

List Of AWS Courses Offered By Mindmajix:

If you interested to learn AWS and build a career in Cloud Computing?  Then check out our AWS Certification Training Course at your near Cities

AWS Training Ahmedabad, AWS Training Bangalore  AWS Training Chennai,  AWS Training Delhi, AWS Training Dallas, AWS Training Hyderabad, AWS Training London, AWS Training Mumbai, AWS Training NewYork, AWS Training Pune

These courses are incorporated with Live instructor-led training, Industry Use cases, and hands-on live projects. This training program will make you an expert in AWS and help you to achieve your dream job.

Subscribe For Free Demo

Free Demo for Corporate & Online Trainings.

About The Author

Prasanthi is an expert writer in MongoDB, and has written for various reputable online and print publications. At present, she is working for Mindmajix, and writes content not only on MongoDB, but also on Sharepoint, Uipath, and AWS. Protection Status