Giter VIP home page Giter VIP logo

webhook-sqs-router's Introduction

Webhook -> SQS

Build Status

This project takes HTTP GET or POST requests and pushes them in to SQS for you to process later.

Setup

Prerequisites

  1. Setup an SQS queue
  2. Setup an IAM user, noting down the public and secret keys
  3. Apply the following IAM policy (customise for your arn)
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1399607812000",
      "Effect": "Allow",
      "Action": [
        "sqs:SendMessage"
      ],
      "Resource": [
        "<your arn>"
      ]
    }
  ]
}

Install the app

git clone https://github.com/ukd1/webhook-sqs-router.git
cd webhook-sqs-router
heroku create
git push heroku -u master
heroku config:set SQS_QUEUE=xxxx SQS_PUBLIC_KEY=xxxx SQS_SECRET_KEY=xxxx

Use

Do a GET request:

curl https://your-heroku-app.herokuapp.com/path_to_request?your=params

something similar to this will get pushed to SQS:

{'request': {'host': 'your-heroku-app.herokuapp.com', 'method': 'GET', 'path': '/path_to_request', 'ts': '2014-05-08 ....'}, 'params': {'your': 'params'}}

Similar for POST:

curl -X POST -d "your=params" https://your-heroku-app.herokuapp.com/another_path_to_request

Note, the method and path change:

{'request': {'host': 'your-heroku-app.herokuapp.com', 'method': 'POST', 'path': '/another_path_to_request', 'ts': '2014-05-08 ....'}, 'params': {'your': 'params'}}

webhook-sqs-router's People

Stargazers

Jeff Triplett avatar

Watchers

Russell Smith avatar James Cloos avatar  avatar

Forkers

2mia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.