Marcus Rochester
Published © GPL3+

AWS IOT Button + IFTTT's Maker Channel

This is a step by step guide to getting the AWS IoT Button to access IFTTT's Maker Channel.

IntermediateProtip1 hour15,852
AWS IOT Button + IFTTT's Maker Channel

Things used in this project

Hardware components

AWS IoT Button
Amazon Web Services AWS IoT Button
×1

Software apps and online services

AWS Lambda
Amazon Web Services AWS Lambda
You will receive 1 free year when you sign up
Maker service
IFTTT Maker service
AWS IoT
Amazon Web Services AWS IoT

Story

Read more

Code

AWS Lambda Code

JavaScript
Make sure to replace [your private key here] with appropriate maker channel private ID
var https = require('https');

exports.handler = function(event, context) {

    var body='';
    var jsonObject = JSON.stringify(event);

    // the post options
    var optionspost = {
        host: 'maker.ifttt.com',
        path: '/trigger/' + event.clickType + '/with/key/[your private key here]',
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        }
    };

    var reqPost = https.request(optionspost, function(res) {
        console.log("statusCode: ", res.statusCode);
        res.on('data', function (chunk) {
            body += chunk;
        });
        context.succeed('Thanks Marcus');
    });

    reqPost.write(jsonObject);
    reqPost.end();
};

Credits

Marcus Rochester

Marcus Rochester

1 project • 4 followers
Just a simple DIY-er.

Comments