Drew Alden
Published © MIT

Amazon Re:Invent "Dash" Button + AWS + IFTTT = InfiniButton!

Why make a button with a single function (a la Dash purchase) when you can make it do ANYTHING? Customizable online at any time via IFTTT!

IntermediateFull instructions provided19,310
Amazon Re:Invent "Dash" Button + AWS + IFTTT = InfiniButton!

Things used in this project

Hardware components

AWS IoT Button
Amazon Web Services AWS IoT Button
×1

Software apps and online services

Maker service
IFTTT Maker service

Story

Read more

Code

index.js (AWSIoTButton Function)

JavaScript
Main function to forward AWS IoT Button presses to IFTTT via AWS Lambda.
AWS.config.update({region:'us-east-1'});
var IFTTTkey = "<YOUR KEY>";
var request = require('request');

//this is called when the AWS Button is pressed and event data is passed as well
exports.handler = function(event, context) {
    console.log("Received AWS Button event: " + event.clickType + ". Firing IFTTT Maker Trigger...");
    request('https://maker.ifttt.com/trigger/' + 'AWS-'+ buttonState + '/with/key/' + IFTTTkey, function (error, response, body) {
        console.log("Complete! Response: ", response.statusCode);
    }
)};

Credits

Drew Alden

Drew Alden

14 projects • 101 followers
Hackster Live Community Lead & 1st Ambassador (PHX), php, infosec, hardware hacking, iPhone jailbreaking, game/graphics/display tech.

Comments