This sample TypeScript application demonstrates how to create a webhook subscription for Dwolla events, deployed to AWS via Lambda function.
This app deploys a webhook handler as an AWS Lambda function using the Serverless Framework. You can deploy one to your AWS account(s) as follows:
NOTE: Any pnpm command can be replaced with npm.
- Clone the repository and install dependencies with
pnpm install - Rename
.env.exampleto.env, and update the environment variables - Run
pnpm sls:deployto create the Lambda functions. After they deploy, a publicly accessible HTTP endpoint is logged to the console asendpoint. Copy and paste it into theURLvariable inscripts/one-time-setup.ts - Run
pnpm hook:setupto create your Webhook Subscription - Run
pnpm hook:create-customerto create a customer in Dwolla's API - Check your webhook function's logs by running
pnpm sls:logs:webhook. You should see a message indicating that the webhook has been moved to your SQS queue for processing. - Check your SQS function's logs by running
pnpm sls:logs:queue. You should see the contents of the webhook after it has been parsed. - [Optional] To remove the resources in AWS, run
pnpm sls:remove