AWS IoT — Twilio Bridge

We build too many walls and not enough bridges

This post introduces one of our first applications listed under AWS Serverless Application Repository.

This serverless application provides a bridge between AWS IoT and Twilio for your devices to send messages to Twillio. The code and details are available at

What is AWS Serverless Application Repository?

The AWS Serverless Application Repository is a collection of serverless applications ranging from code samples and components for building web and mobile applications to back-end processing services and complete applications. Each application is packaged with an AWS Serverless Application Model (SAM) template that defines the AWS resources used. The Serverless Application Repository enables you to quickly deploy these code samples, components, and applications for common use cases such as web and mobile back-ends, data processing, chatbots, IoT, and more. There is no charge to use the Serverless Application Repository — you only pay for the AWS resources used in the applications you deploy.

Check this launch video for more details.

Use Cases

  1. Create an alert topic and notify end users directly through Twilio.
  2. Alert admins on any significant event (new devices, high watermark, etc.) or any alert threshold being reached.


  1. Sign up for a Twilio account
  2. Create a new phone number in your Twilio account
  3. Copy your Account SID and Auth Token from the Twilio console
  4. AWS IoT Topic which will be used as the trigger for the lambda


You will need the following information from the previous steps and configure them in the template.yaml file

  1. AccountSID — Account SID for Twilio account.
  2. AuthToken — AuthToken for Twilio account.
  3. IncomingTopic — The topic that will be used as the trigger for the lambda.
  4. FromNumber — The phone number the message is coming from.


The following Input Format is expected from the IoT Topic to trigger the Twilio Workflow

"deviceID": "deviceID123",
"incomingText": "Text From Device"
"toNumber": "+1xxxxxxxxxx"


This is released under the MIT license. Details can be found in the LICENSE file.