Using AWS IoT button – Simple Example

Amazon did a limited release of the programmable Dash button and unsurprisingly it got sold out within a day. It’s stated in amazon.com that “We don’t know when or if this item will be back in stock.“, hence you might need to wait to get one.

I take this opportunity to write a post about how I used the AWS IoT button that I received in AWS re:Invent 2015 to show case AWS IoT to the team.

awsiotbutton

This IoT button should be configured to connect to a WiFi network and once connected it shall send three different clickType events SINGLE, DOUBLE & LONG. As the name says it gets generated based on single click, double click or long press. AWS docs contains detailed steps about how to create Lambda rule to work with AWS IoT.

I created a Lambda function which will create CloudFormation stack for event type SINGLE, event type DOUBLE will get the list of EC2 instances created by the CloudFormation stack and stop them and event type LONG will delete that CloudFormation stack. This is a simple example but this showcases how easy it’s to use this and how much we can exploit this for our requirement.

Lambda function that handles IoT event


1 Comment

 Add your comment
  1. We are seeing lot of innovative technologies emerging in the Internet of Things field and it is great to see Amazon offering IoT solutions which work with their Amazon Web Services platform. This brings a lot of potential which developers can use like the example shown in this article.

Leave a Comment

Your email address will not be published.