A sample AWS Lambda function to push Amazon SNS notifications to IFTTT via the Maker channel.
Here's a few customizations of this project to better handle specific events via SNS:
- CloudWatchAlarm2IFTTT for Amazon CloudWatch alarms
- AutoScaling2IFTTT for EC2 Auto Scaling notifications
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.
- Go to https://ifttt.com/maker and write down your secret key
- Create a new Amazon SNS topic, e.g.
ifttt-maker
- Create a new AWS Lambda function, e.g.
sns-2-ifttt
- Use Node.js as runtime
- Paste the code inline from the
index.js
file included in this repository - Replace the
iftttMakerSecretKey
with the one you wrote down at step 1 - (Optional) Replace the
iftttMakerEventName
with the one you want to use - Leave the default handler
- Use a basic execution role
- Leave the default memory (128MB) and timeout (3s)
- Add SNS as an event source to the Lambda function
- Choose the SNS topic created at step 1
- In the options, enable the event source now (not later)
- Select My Recipes
- Create a Recipes
- Choose Maker as Trigger ('this')
- Select Receive a Web Request
- Write the Event Name exacly as is the
iftttMakerEventName
variable of the Lambda function (step 3.4 on AWS) - Select Create Trigger
Value1
contains the body of the SNS message- Choose whatever you want as Action ('that'), for example:
- 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
SNS {{Value1}}
- A Channel from the Connected Home category to have a visible effect, e.g. Philips Hue to change the color of your lights to blue
- Slack to send a message to your team
- Trello to create a new card
- GitHub to create a new issue
- You can test the setup from the SNS web console
- Select the topic
- Publish a test message
Please give me your feedback here.