Generate code and manage infrastructure for receiving webhooks with AWS API Gateway and pushing to SQS via Lambda.
Project description
Generate code and manage infrastructure for receiving webhooks with AWS API Gateway and pushing to SQS via Lambda.
Webhooks are great, and many projects and services are now offering them as a notification option. But sometimes it makes more sense to have the messages in a queue that can absorb changes in rate and de-couple the sending service from a potentially slow or unavailable backend.
webhook2lambda2sqs generates code for an AWS Lambda function to receive webhook content via API Gateway and push it to an SQS queue, where it can be consumed as needed. It supports multiple endpoints via unique URL paths (API Gateway resources), where content sent to each endpoint is pushed to one or more SQS queues.
In addition, webhook2lambda2sqs includes a wrapper around HashiCorp Terraform to automate creation and maintenance of all or part of the infrastructure required to operate this (the API Gateway and its configuration, the Lambda function, the function’s IAM role, etc.). If TerraForm isn’t a viable option for you to manage infrastructure with, you can use the generated configuration (which maps quite closely to AWS API parameters) as a guide for manual management.
There are also helper commands to view the Lambda Function and API Gateway logs, send a test message, and view the queue contents.
For full documentation, see: http://webhook2lambda2sqs.readthedocs.io/en/latest/
Requirements
An Amazon AWS account to run this all in (note - it will probably be cheap, but not free)
Python 2.7+ (currently tested with 2.7, 3.3, 3.4, 3.5). Note that AWS Lambda currently only supports python 2.7 as an execution environment, but you’re welcome to use other versions on the machine where you run this project.
Python VirtualEnv and pip (recommended installation method; your OS/distribution should have packages for these)
HashiCorp Terraform >= 0.6.16 to manage the AWS infrastructure, if desired. Terraform is written in Go, and distributed as a static binary.
Program Components
Lambda Function code generation
Terraform configuration generation
Management of infrastructure via Terraform
AWS-related helpers for inspecting queues and logs, querying information, and enabling metrics/logging/rate limiting on the API Gateway.
Full Documentation
For full documentation, see: http://webhook2lambda2sqs.readthedocs.io/en/latest/
Bugs and Feature Requests
Bug reports and feature requests are happily accepted via the GitHub Issue Tracker. Pull requests are welcome. Issues that don’t have an accompanying pull request will be worked on as my time and priority allows.
A Note About the License
This program is licensed under the GNU Affero General Public License, version 3.0 or later (“AGPLv3”). The AGPLv3 includes a clause that source code must be made available to anyone using the program over a network.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file webhook2lambda2sqs-0.2.0.tar.gz
.
File metadata
- Download URL: webhook2lambda2sqs-0.2.0.tar.gz
- Upload date:
- Size: 60.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c51f7d451c0dfc6e162ef324383b431649de33b151fe6846c82593c30d85e77 |
|
MD5 | e805d9940ec859612b1a117f6d22b974 |
|
BLAKE2b-256 | 6ed285b807fc86421d3fb42113e3593381af2f24c8734ea9aa29f0cbebb99093 |
File details
Details for the file webhook2lambda2sqs-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: webhook2lambda2sqs-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 76.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 655da7e72949bd4eae98dc178c6ad66e21fc076557fee54417dce26c167f382a |
|
MD5 | 332cae68308970fe3ba127cad20f9a29 |
|
BLAKE2b-256 | 87681c1680bea4557a315494b7b4b458c612d65b6d17d1475438b9e49584c7ac |