A sample AWS Lambda function to push Amazon CloudWatch alarms to IFTTT via the Maker channel
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js

README.md

CloudWatchAlarm2IFTTT

A sample AWS Lambda function to push Amazon CloudWatch alarms to IFTTT via the Maker channel.

License

Copyright (c) 2015 Danilo Poccia, http://danilop.net

This code is licensed under the The MIT License (MIT). Please see the LICENSE file that accompanies this project for the terms of use.

Installation

On IFTTT

  1. Go to https://ifttt.com/maker and write down your secret key

On AWS

  1. Create a new Amazon SNS topic, e.g. cloudwatch-alarms
  2. Create a new AWS Lambda function, e.g. cloudwatch-2-ifttt
  3. Use Node.js as runtime
  4. Paste the code inline from the index.js file included in this repository
  5. Replace the iftttMakerSecretKey with the one you wrote down at step 1
  6. (Optional) Replace the iftttMakerEventName with the one you want to use
  7. Leave the default handler
  8. Use a basic execution role
  9. Leave the default memory (128MB) and timeout (3s)
  10. Add SNS as an event source to the Lambda function
  11. Choose the SNS topic created at step 2
  12. In the options, enable the event source now (not later)
  13. For the CloudWatch Alarms you want to push to IFTTT
  14. Select the state you are interested to. e.g. State is ALARM
  15. Send notification to the SNS topic created at step 2

On IFTTT

  1. Select My Recipes
  2. Create a Recipes
  3. Choose Maker as Trigger ('this')
  4. Select Receive a Web Request
  5. Write the Event Name exacly as is the iftttMakerEventName variable of the Lambda function (step 3.4)
  6. Select Create Trigger
  7. Value1 contains a summary of the CloudWatch alarm as built in the Lambda function
  8. Choose whatever you want as Action ('that'), for example:
  9. iOS or Android Notifications to receive it on your mobile (you need the IF app from IFTTT installed on the device), e.g. you can set the notification to CloudWatch {{Value1}}
  10. A Channel from the Connected Home category to have a visible effect, e.g. Philips Hue to change the color of your lights to red
  11. Slack to send a message to your team
  12. Trello to create a new card
  13. GitHub to create a new issue

Feedback

Please give me your feedback here.