Overview
Object storage triggers start a workflow or an agent when an object is created in an S3 bucket. S3 publishes each event to an SNS topic in your AWS account, and the topic delivers it to a Tracecat HTTPS endpoint. Tracecat stores one event per object, then starts the triggers bound to it.Set up the event source
-
Create an SNS event source in Tracecat with your topic ARN, such as
arn:aws:sns:us-east-1:123456789012:bucket-events. Tracecat accepts messages from that topic only. -
Copy the source’s endpoint URL. It has the form
https://<your-tracecat-api>/ingest/sns/<token>. Only members with thetrigger:updatescope see it; for others the field is empty. Treat the URL as a secret. -
Allow only your bucket to publish to the topic. Add this statement to the topic’s access policy, with your topic ARN, bucket name and account ID:
Keep both conditions. Without them, any S3 bucket in any AWS account can publish to your topic, and Tracecat accepts its events because SNS signs them for your topic.
-
In S3, add an event notification on the bucket for
s3:ObjectCreated:*events with your SNS topic as the destination. Set a key prefix to limit which objects send events. S3 checks that it may publish to the topic, so add the topic policy first. -
Subscribe the endpoint URL to the topic with the
HTTPSprotocol. Leave raw message delivery off. -
Set the subscription’s delivery retry policy to retry for one hour, and attach a dead-letter queue (an SQS queue) to the subscription. If you also throttle delivery (
maxReceivesPerSecond), keep the limit high enough that a backlog drains within 24 hours: Tracecat refuses messages older than that.
ConfirmSubscription API. The source shows the subscription as confirmed when it is done. Turn the source online to start queuing events.
Delivery rules
Tracecat checks every message before it stores anything:- The message must be signed by SNS. Tracecat verifies the signature against the SNS signing certificate for your topic’s region.
- The message must come from the source’s topic.
- The message must be less than 24 hours old.
- Raw message delivery is refused, because raw messages carry no signature.
ObjectCreated:* records become events. Tracecat acknowledges the S3 test event and other event types without storing them. A redelivered message for an object already queued is stored once.
An offline source refuses notifications with
409, so events sent while it is offline go to your dead-letter queue instead of being dropped. Subscription confirmations work while the source is offline, so you can confirm the subscription before you turn the source online.
Each source accepts up to 6,000 new notifications per minute by default; redeliveries of events still queued do not count. Past that, Tracecat answers 503 and SNS retries later. Messages that are still refused when your retry policy runs out go to your dead-letter queue.
Event payload
Each event has the same shape:
Object keys come from whoever writes to the bucket. Treat them as untrusted data in your workflow.