Comments (2)
This implementation accepts the webhook from Github, validates that it came from github, and then forwards the event to your lambda function via SNS message. The problem is that there's a limit on the acceptable size of an SNS message, and Github messages for particularly gnarly commits / prs can surpass that limit.
There's also a PR #2 that would do nothing more than set up the API gateway resources and send the webhooks directly to your lambda function. Downside there is that the authentication isn't done for you.
One approach to consider:
- Make this library
module.exports
a function for validating the payload from the webhook - Merge #2
- If you want to listen to non-push events, you could use the passthrough webhook from #2 and then in your own lambda code utilize the payload validation script?
Another approach might be to drop the SNS middleman and have the validation function make a lambda.invoke()
request. The downside there is that there's no baked-in-retry on direct lambda invocations.
from deprecated-hookshot.
This is solved by the new .passthrough()
function.
from deprecated-hookshot.
Related Issues (12)
- Publish! HOT 1
- Use API key instead of creating an AWS IAM user HOT 1
- .passthrough() OPTIONS integration does not work for XHR requests HOT 3
- Access-Control-Allow-Headers not getting set in OPTIONS response with CORS
- Eng standards inventory HOT 1
- Archive this repository HOT 2
- Update readme to be general
- Can I access $context in my API? HOT 5
- CF template with multiple webhooks would have naming collisions HOT 1
- CORS option
- Replace AWS::ApiGateway::Deployment name on updates HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deprecated-hookshot.