Please note that this application will create AWS resources that may incur costs on your account.
This is a workbench for AWS EventBridge Pipeline with API Destinations. It demonstrates how to use EventBridge Pipeline to build a serverless event-driven application that integrates with a third party application that can be anywhere on the public internet.
Since (error) logging is not available in EventBridge Pipeline, this workbench also demonstrates how to use an API Gateway as a proxy allowing to observe the events and responses that are sent to the third party API.
- Java 17 (Corretto recommended)
- AWS CDK
- Node.js as required by the AWS CDK
You will also need to have an AWS account and have your AWS credentials configured on your machine. If you have not used
CDK before, you may need to run cdk bootstrap
to create the resources required to deploy CDK applications.
To build and deploy the application, follow these steps:
- Clone this repository.
- Navigate to webhook.site and create a new endpoint. Copy the URL of the endpoint.
- Run
./gradlew clean :app:optimizedJitJarAll
to build the Lambda function that will enrich the events. - Change to the
infra
directory by runningcd infra
. - Run
cdk deploy --parameters "endpointUrl=<url of the endpoint from step 2>/*"
to deploy the application.
To test the application, follow these steps:
- Navigate to your webhook.site.
- Run
./gradlew :app:systemTests
to send a test event to the application.
After a few seconds you should see a request appear in your webhook.site dashboard. The request should contain an authorization header and body that was added by the Lambda function.