Boilerplate AWS Lambda service which is invoked via API Gateway as a Webhook. The Request to the service must include a JSON body with the webhook payload. The webhook retrieves data from DynamoDB based on the JSON payload,modifies/updates the data with the payload, and saves it back to DynamoDB.
Docker needs to be installed (for local DynamoDB). jq is also required for
local development.
Best practice is to develop locally using a TDD approach. The boilerplate includes sample tests on which you can build, including example of how to mock AWS services.
Start the development environment with:
yarn devTry out the webhook with curl:
curl -s \
-X POST \
-H "content-type: application/json" \
-d '{"id":"s1d2f34","foo":"bar"}' \
http://localhost:3000/webhook | \
jqyarn testor
yarn watch:testPlease see the guide/instructions in the Typescript boilerplate.
yarn deploynpm version prereleasenpm version [major|minor|patch]