TL;DR
With no trail, 0 of 10 API-call events reached EventBridge, though CloudTrail's history recorded all 10.
With a trail logging, events arrived within seconds. A second run with nine real create calls had every one delivered (1 to 19 s).
With no trail, native service events (EBS, EC2, RDS) still reach EventBridge, so you can detect new resources, but they don't say who made them.
How I tested. A rule on AWS API Call via CloudTrail for SNS CreateTopic sent matching events to an SQS queue. SQS timestamps each message, so I compared that with the event's own time. A control rule with a custom event proved the queue worked before I trusted an empty result.
Results
Reached EventBridge Delay
No trail 0 of 10 (history recorded all 10) n/a
Trail logging 10 of 10 about 2 to 30 s
No trail: what still works
Resource Native event Found in history by ID By tag in the tagging API
EBS volume createVolume, 3 s after 130 s yes
EC2 instance state changes after 252 s yes
RDS database RDS-EVENT-0005 at creation, ~3.5 min after 288 s yes
Do the events say what was created? Yes. For nine create calls, RunInstances, CreateVolume, CreateSnapshot, RegisterImage, StartSnapshot, CreateDBInstance, CreateDBSnapshot, RestoreDBInstanceFromDBSnapshot and others, the new resource's ID is in detail.responseElements. CompleteSnapshot carries only the snapshot ID in the request. The envelope's resources array was empty every time, and failed calls are delivered too, with an errorCode.
Caveats. One account, one region, root caller, small resources. Delivery being complete in two runs doesn't mean it's guaranteed. An earlier run with a stopped trail delivered only 3 of 10, and I can't explain it.
Why I care. I'm building a way to check that restores actually worked, inside your own AWS account, which means spotting a restore the moment it happens. If you'd like yours checked, early access is free while it's early: muster-drill.com/?src=devto. And if you've seen different behaviour, tell me in the comments.
Top comments (0)