AWS IoT — Twilio Bridge
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 https://github.com/TensorIoT/sar-iot-twillio-bridge
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.
- Create an alert topic and notify end users directly through Twilio.
- Alert admins on any significant event (new devices, high watermark, etc.) or any alert threshold being reached.
- Sign up for a Twilio account
- Create a new phone number in your Twilio account
- Copy your Account SID and Auth Token from the Twilio console
- 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
- AccountSID — Account SID for Twilio account.
- AuthToken — AuthToken for Twilio account.
- IncomingTopic — The topic that will be used as the trigger for the lambda.
- FromNumber — The phone number the message is coming from.
The following Input Format is expected from the IoT Topic to trigger the Twilio Workflow
"incomingText": "Text From Device"
This is released under the MIT license. Details can be found in the LICENSE file.