Amazon EventBridge
Put Dataflow's events on an Amazon EventBridge bus, with source piloterr.dataflow and the topic as detail-type, and route them with rules.
Each event becomes one EventBridge event on your bus, with source piloterr.dataflow and the topic as detail-type. Your rules then send it to Lambda, Step Functions, SQS or any other target.
Set up the bus
Pick or create a bus
Use the account's default bus, or create one: EventBridge → Event buses → Create event bus, or:
aws events create-event-bus --name dataflow --region eu-west-1Create an IAM user that can only put events on it
Create an IAM user for Dataflow, with no console access, and give it this policy, with your bus's ARN (event-bus/default for the default bus):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "events:PutEvents",
"Resource": "arn:aws:events:eu-west-1:123456789012:event-bus/dataflow"
}
]
}To accept only our address, add "Condition": { "IpAddress": { "aws:SourceIp": "116.203.84.164/32" } } to the statement, with the exit_ips of GET /v1/destinations/types. A bus in another account than the key's also needs a resource policy that lets the key's account put events on it.
Create an access key
On the user, Security credentials → Create access key, use case Application running outside AWS. Keep the access key ID and the secret access key. Temporary credentials work too, with their session token, but deliveries fail once they expire.
Add a rule
Create a rule on the bus with an event pattern, and a target:
{
"source": ["piloterr.dataflow"],
"detail-type": ["run.completed", "run.failed"]
}To match one project only, add "detail": { "data": { "project": { "id": ["PROJECT_ID"] } } }.
Add the destination
curl https://dataflow.piloterr.com/v1/destinations \
-H "x-api-key: YOUR_API_KEY" -H "content-type: application/json" \
-d '{
"type": "aws_eventbridge",
"config": { "region": "eu-west-1", "event_bus_name": "dataflow" },
"credentials": { "access_key_id": "AKIAIOSFODNN7EXAMPLE", "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" },
"topics": ["*"]
}'| Field | Required | Secret | Holds |
|---|---|---|---|
config.region | yes | no | The bus's region, such as eu-west-1. |
config.event_bus_name | no | no | The bus's name or ARN. Left out: the account's default bus. |
credentials.access_key_id | yes | yes | The IAM user's access key ID, AKIA…. |
credentials.secret_access_key | yes | yes | Its secret access key. |
credentials.session_token | no | yes | For temporary credentials only. Deliveries fail once it expires. |
Credentials are stored encrypted and shown masked (AKIA…). To change them, send them all again with PATCH. See Credentials.
Network
Events go to the EventBridge API over HTTPS (443), from our egress address, 116.203.84.164 (exit_ips of GET /v1/destinations/types). There is nothing to open on your side.
What the bus receives
{
"version": "0",
"id": "EVENTBRIDGE_EVENT_ID",
"detail-type": "run.completed",
"source": "piloterr.dataflow",
"account": "123456789012",
"time": "2026-12-01T08:42:11Z",
"region": "eu-west-1",
"resources": [],
"detail": {
"metadata": { "event-id": "RUN_ID", "topic": "run.completed", "timestamp": "2026-12-01T08:42:11Z" },
"data": { "id": "RUN_ID", "version": 1, "type": "run.completed", "…": "…" }
}
}sourceis alwayspiloterr.dataflow, anddetail-typeis the topic.detail.datais the event payload.detail.metadataholdsevent-id(the payload'sid: deduplicate on it),topicandtimestamp(when it was sent).
EventBridge takes events under 1 MB. A run.results batch close to 1 MiB can go over and fail: for large runs, take the rows from the export link of run.completed instead.
Test it
Send a test event from the dashboard, or POST /v1/destinations/{id}/test (details). To see it arrive, give your rule a CloudWatch Logs log group as a target. The delivery log's code is OK, or ERR for any failure.
| Problem | Fix |
|---|---|
422 validation_failed on config.region | Use a region code such as eu-west-1. |
ERR on every delivery | Check, in this order: the policy allows events:PutEvents on this bus's ARN; an aws:SourceIp condition names our address; the key is active (a session token has not expired) and both credentials were copied whole; the region and bus name are the bus's. |
OK but nothing reaches the target | The rule's pattern does not match: source is piloterr.dataflow and detail-type the topic, such as run.completed. |
Other errors: Errors.