Wednesday, September 27, 2017

AWS IoT Button (2nd gen.): sending an SMS message

I recently purchased an AWS IoT Button (2nd generation), which can be found here for $20. This is basically a physical button that connects to wi-fi and easily integrates with AWS applications, especially Lambda.



To set  up my button, I followed the process here. I opted for to download the iOS app to ensure the easiest setup process.

The first time I tried setting up the button, I couldn't connect it to wi-fi (so it was useless). I tried several different networks, to no avail. Seeing no other options, I gave it a rest and tried again the next day. With no apparent change to my network or setup process, the button connected as intended.

At the end of the mobile app-based setup process, I was prompted to set a Lambda function that will be executed when the button is clicked. I chose the preset function to send an SMS message using Python. (Note: This function will appear in your Lambda console and can be edited in any way.) I entered my cell phone number and desired message, then tested my button.



Viola! I received a text message from my button with the message I set. (I tested the button a few more times, just to make sure.)



Here's a video demonstration of my results: 



This functionality may be simple, but I can imagine it being used in a variety of settings, from hospitals and hotels to restaurants and airplanes. More importantly, this exercise laid the foundation for me to create more complex functions in the future.

No comments:

Post a Comment