Ryan Kauffman
Published © GPL3+

How to Save a Child’s Life with Python, AWS & Twilio IoT

Create a Twilio IoT hotspot for sending a SMS using AWS Lambda and the AWS IoT button inside a car.

EasyFull instructions provided2 hours4,116
How to Save a Child’s Life with Python, AWS & Twilio IoT

Things used in this project

Hardware components

Programmable Wireless
Twilio Programmable Wireless
×1
AWS IoT Button
Amazon Web Services AWS IoT Button
×1
Blu - C4
×1

Software apps and online services

SMS Messaging API
Twilio SMS Messaging API
AWS Lambda
Amazon Web Services AWS Lambda

Story

Read more

Schematics

Github

An AWS Lambda function that sends an SMS text message on the click of an IoT button.

twilioiot-rescuebutton_dsmm4oiw6u_ZY3MIbmrKM.jpg

Code

Untitled file

Python
This is the Lambda Handler with Twilio Helper Library
import os
from twilio.rest import Client


def handler(event, context):
    client = Client(
      os.environ['TWILIO_ACCOUNT'],
      os.environ['TWILIO_TOKEN'])

    client.messages.create(
        to=os.environ['ALERT_PHONE'],
        body=os.environ['HELP_MSG'],
        from_=os.environ['TWILIO_PHONE'])

Credits

Ryan Kauffman

Ryan Kauffman

2 projects • 6 followers

Comments

Add projectSign up / Login