This example shows how to verify a Vertex webhook's payload with the x-vertex-signature header.
This example is deployed as an AWS Lambda function via the AWS CDK. The stack defined at ./scripts/stack.ts. You can deploy one to your AWS account as follows,
- Clone the repository and install dependencies with
yarn install - Using your
WEBHOOK_SECRET, RunWEBHOOK_SECRET=[YOUR_WEBHOOK_SECRET] yarn deployto create the Lambda function. After the deploy, a publicly accessible HTTP endpoint is logged to the console. - Once you have created a webhook subscription and initiated an event that triggers one, check your Lambda function's logs for
Received ..., body=... - [Optional] Remove the AWS resources,
yarn destroy