webhook2lambda2sqs¶
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.
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.
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.
Contents¶
- Requirements and Installation
- Configuration
- Usage
- HTTP Responses
- Queue Message Format
- API
- webhook2lambda2sqs package
- Submodules
- webhook2lambda2sqs.aws module
- webhook2lambda2sqs.config module
- webhook2lambda2sqs.func_generator module
- webhook2lambda2sqs.json_templates module
- webhook2lambda2sqs.lambda_func module
- webhook2lambda2sqs.runner module
- webhook2lambda2sqs.terraform_runner module
- webhook2lambda2sqs.tf_generator module
- webhook2lambda2sqs.utils module
- webhook2lambda2sqs.version module
- Submodules
- webhook2lambda2sqs package
- Development
- Changelog
Indices and tables¶
License¶
webhook2lambda2sqs is licensed under the GNU Affero General Public License, version 3 or later. This shouldn’t be much of a concern to most people.