The aws_eventbridge provider publishes events to an EventBridge event bus via the PutEvents API. Once on the bus, EventBridge rules can route events to Lambda, Step Functions, SQS, SNS, Kinesis, or any other supported target.

When to use this: you already use EventBridge as your serverless event router and want webhooks to land on the same bus.

SigV4 signing runs on crypto.subtle — no AWS SDK bundled into the Worker.

Configuration

event_bus_arnstringrequiredpath

ARN of the target event bus, or "default" for the account's default bus.

regionstringrequiredpath

AWS region the bus lives in.

sourcestringrequiredpath

Value used for the EventBridge Source field on every published event, e.g. "hookstream" or "myapp.webhooks".

detail_typestringrequiredpath

Value used for the EventBridge DetailType field, e.g. "WebhookEvent".

access_key_idstringrequiredpath

IAM access key ID with events:PutEvents permission.

secret_access_keystringrequiredpath

IAM secret access key. Stored encrypted, masked in GET responses.

Event Shape

hookstream calls PutEvents with the webhook body serialized into the Detail field:

json
{ "Source": "hookstream", "DetailType": "WebhookEvent", "Detail": "{...webhook body...}", "EventBusName": "my-bus"}

Write EventBridge rules against the source, detail-type, or inner detail fields to fan out to downstream targets.

Authentication

Create an IAM user with events:PutEvents on your target bus ARN:

json
{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": "events:PutEvents", "Resource": "arn:aws:events:us-east-1:123456789:event-bus/my-bus" }]}

Example

bash
curl -X POST https://hookstream.io/v1/destinations \ -H "X-API-Key: $HOOKSTREAM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Order Events Bus", "type": "aws_eventbridge", "config": { "event_bus_arn": "arn:aws:events:us-east-1:123456789:event-bus/my-bus", "region": "us-east-1", "source": "hookstream", "detail_type": "WebhookEvent", "access_key_id": "AKIA...", "secret_access_key": "wJal..." } }'

Gotchas

EventBridge enforces a 256 KB limit on the Detail field. For larger payloads, use AWS S3 and trigger rules from object creation events instead.

Next Steps

AWS SQS

Push to SQS directly if you don't need rule-based routing.

Learn More
AWS S3

Archive events as S3 objects.

Learn More
GCP Pub/Sub

The GCP equivalent for fan-out messaging.

Learn More
Destinations API

Full API reference.

Learn More