Twilio is the communciton platform that millions of developers trust to build seamless communications experiences with phone calls, text messages, video calls, and more.
The Amazon SNS platform (SNS) is a web service that enables you to send an SMS or a text-enabled mobile push notification to targeted subscribers.
Amazon SNS IntegrationsIt's easy to connect Twilio + Amazon SNS without coding knowledge. Start creating your own business flow.
Triggers once a call is completed on your Twilio number.
Triggers once a new recording becomes available on your Twilio account.
Triggers the moment an SMS is sent to your Twilio Number.
Triggers when you add a new subscription.
Triggers when you add a new topic.
Call a number or numbers and say your predefined message.
Send a SMS to a number or numbers.
Create a new message.
Create a new topic.
(30 seconds)
(10 seconds)
(30 seconds)
(10 seconds)
(2 minutes)
Twilio is a cloud-based telecommunication platform. It is considered as the world’s leading programmable communications platform. It provides an easy way to build, scale and maintain applications that interact with voice, text messages, and video. It allows developers to focus on the application rather than having to deal with the complex infrastructure. Twilio manages all the complexity of telephony infrastructure for cloud-based communication service.
Amazon Simple Notification Service (SNS. is a flexible, fully managed push messaging service that enables developers to send notifications from applications running on AWS to other applications or end users. It enables customers to easily set up event-driven communication channels and send notifications to these channels.
Amazon SNS can be used in many ways such as sending notifications to mobile phones, emailing notifications on completion of tasks, and sending notifications for system auto scaling.
We will now go through the steps required to integrate Twilio and Amazon SNS. These steps are elaborated below:
Step 1. Set up your Amazon Web Services account
The first step would be to set up your Amazon Web Services account. You can do this by clicking here. Next you will have to click the ‘Create a Free Account’ button on the top right corner of the page. Once you have created your account, you will be directed to your AWS Account dashboard where you will be asked to select a region (you can choose any one of the regions provided. as shown in the image below:
Step 2. Create an Amazon SNS Topic
Now that we have our Amazon Web Services account ready, we will proceed to create the Amazon SNS Topic. To do so, click on ‘SNS’ under ‘APPLICATIONS’ on the left panel of your AWS Account Dashboard. Click on ‘Create Topic’ under ‘Topics’ section on the top menu bar and fill out the form as shown in the image below:
Step 3. Get your Twilio Account ID and Secret Key
Next, head over to https://www.twilio.com/conspe/developers/accounts and sign in with your Twilio account credentials. You can find your Twilio Account ID and Twilio Account Secret Key on the Settings page of your Twilio account, as shown in the image below:
Step 4. Sign Up for an Amazon SNS Topic to Receive Messages from Twilio
Now that we have all the necessary information we can start integrating Twilio and Amazon SNS. The first step is to get an Amazon SNS Topic created which will allow us to receive messages from Twilio. We can do that by clicking on ‘SNS’ under ‘APPLICATIONS’ on the left panel of your AWS Account Dashboard. Next click on ‘Create Topic’ under Topics section on the top menu bar and fill out the form as shown in the image below:
Step 5. Create a Lambda Function for Amazon SNS Receive Message Handler
Next, we will define our Lambda function for Amazon SNS Receive Message Handler. This function will handle any incoming messages from our Twilio application. To do this, click on ‘Lambda’ under ‘APPLICATIONS’ on the left panel of your AWS Account Dashboard. Next click on +Create a Lambda Function in the Actions drop down menu and enter in the name of your function. For example, I have named mine “sns handler” as shown in the image below:
Step 6. Choose Runtime as NodeJS 6.10 and Rpe as “Basic Execution Rpe”
Then you will be presented with a list of available runtime options. In order to use our Lambda function with Amazon SNS we will need to choose NodeJS 6.10 runtime but if you want it to work with other services then you can choose others as well. Choose an existing rpe or create a new one depending upon what you need as shown in the image below:
Step 7. Click on Next Step Button
Step 8. Create a New Fpder in Your Computer and Click on “Save ARN” Button
Step 9. Click on Next Step Button Again
Step 10. Write Code for Your Lambda Function for Amazon SNS Receive Message Handler
The process to integrate Twilio and Amazon SNS may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.