SNS2IFTTT is a sample AWS Lambda function to push Amazon SNS notifications to IFTTT via the Maker channel.

You can choose what Action you want to do on IFTTT, for example: 1. iOS or Android Notifications to receive it on your mobile (you need the IF app from IFTTT installed on the device) 2. 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 3. Slack to send a message to your team 4. Trello to create a new card 5. GitHub to create a new issue

You can find SNS2IFTTT in its GitHub repository.

There are a few customizations of this project to better handle specific events via SNS:

Fork me on GitHub

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. ifttt-maker
  2. Create a new AWS Lambda function, e.g. sns-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 1
  12. In the options, enable the event source now (not later)

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 on AWS)
  6. Select Create Trigger
  7. Value1 contains the body of the SNS message
  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 SNS
  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

On AWS (optional)

  1. You can test the setup from the SNS web console
  2. Select the topic
  3. Publish a test message

Contribute

Please give me your feedback and fork the repository on GitHub.