AWS EventBridge
Publish events to EventBridge event buses for rule-based routing to Lambda, Step Functions, and beyond.
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
ARN of the target event bus, or "default" for the account's default bus.
AWS region the bus lives in.
Value used for the EventBridge Source field on every published event, e.g. "hookstream" or "myapp.webhooks".
Value used for the EventBridge DetailType field, e.g. "WebhookEvent".
IAM access key ID with events:PutEvents permission.
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
bashcurl -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.