How to send a Mobile Text message using SNS?

Send a Text Message

Amazon SNS supports for User Notifications with subscribers such as mobile phone number and mobile applications.

The user notifications could be of either With Mobile Application as Subscriber (Mobile Push) or With Mobile Phone Number as Subscriber (Send SMS).

Amazon SNS helps to directly send push notification message to the applications on mobile devices. As of now this service is supported for few regions only and you could send messages to more than 200 countries and regions.

In this article, we would more talk about With Mobile Phone Number as Subscriber (Send SMS).

Amazon SNS helps to send text message, SMS messages to all SMS enabled devices. Here is an advantage that you no need to subscribe the phone number to the SNS topic to publish a text message.

You could use SNS console or AWS SDK’s to send the message to phone number. Each SMS contains up to 140 bytes character and depends on the encoding scheme. Below is s snippet of an SMS character limit

If any messages is published with exceeds quota size, then Amazon SNS would splits this message to multiple message with limited quota size. The total size quota for a single SMS publish action is 1600 bytes. The format supported for sending an SMS message is E. 164. The mobile numbers could have max.15 digit for this and could be prefixed with (+) to support country code.

Sending a Text Message

1. Sign into AWS Console (link) and open SNS Service

2. Select Text Messaging (SMS) in the left navigation panel

3. Click on Publish Text Message

4. Fill all the details

Message Type – This is of two types such as Promotional and Transactional.

  • Promotional – This is low cost and used for noncritical messages.
  • Transactional – This is used for critical messages that support customer transactions such one-time password etc.

Phone Number – It supports up to maximum 15 digit number mobile number with (+) country code.

Message – You could write your text message here. Message characters more than 160 would be treated as multiple message by SNS.

Sender ID (Optional) – The sender id is basically a custom ID such as business brand etc.

Select the Message Type as Promotional and provide your Mobile phone number where you want to receive the message.

5. Click on Publish Message

This would successfully would publish a message to your phone number.

6. Verify message

Now, you are successfully able to send a text message (SMS) to a phone number.

Please comment below if you have any questions related to this blog.

Leave a Reply

%d bloggers like this: