An example event-driven application which receives webhooks using serverless on AWS.
This repository contains an example application with an Amazon API Gateway that can be used to receive webhook requests from webhook providers. AWS Lambda is used to verify the requests before persisting the payload into Amazon S3. Metadata about the S3 object is then stored in Amazon DynamoDB for tracking webhook processing.
You can extend the solution using Amazon EventBridge Pipes. The Pipe can be used to detect changes in the DynamoDB and trigger processing of the webhook using the compute option of your choice as illustrated below.
- Python 3
- AWS Command Line Interface (AWS CLI) version 2. Please follow these instructions with how to setup your AWS credentials.
- AWS Serverless Application Model (SAM)
- Docker Desktop
Parameter | Type | Default | Description |
---|---|---|---|
BasicAuthUser | String | - | Basic authentication user name |
BasicAuthPassword | String | - | Basic authentication password |
WebhookSecret | String | - | Webhook secret |
BucketPrefix | String | raw/ | S3 bucket prefix for payloads |
- Deploy the application using AWS SAM and follow the instructions.
sam deploy --guided
- Test sending webhooks using the tool of your choice such as Postman or cURL, or use one of the pre-built providers on src/webhook/app/providers/ such as Plaid or Stripe.
If you have a provider that you'd love to see, we'd love to hear from you.
To avoid unnecessary costs, clean up after using the solution.
sam delete