feat: add CloudTrail S3 log source#2301
Conversation
Add an S3-backed CloudTrail source that lists existing CloudTrail log prefixes, decodes gzipped log envelopes, and feeds records through the existing change and AssumeRole access-log processing path. Track S3 progress with an in-memory object cursor promoted only after successful saves, avoiding scrape-summary metadata while skipping repeated files within the same process.
BenchstatBase: ✅ No significant performance changes detectedFull benchstat output |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Use the same optimistic in-memory cursor model for CloudTrail S3 as the existing API path. Remove save-success hook plumbing and keep the default CloudTrail lookback at 7 days for all sources.
|
We'll use clickhouse scraper |
Add support for reading CloudTrail events from existing S3 log buckets instead of the LookupEvents API.
The S3 source lists CloudTrail date prefixes, reads gzipped log files, and converts records into the existing CloudTrail processing path for changes and AssumeRole access logs.
Progress is tracked with an in-memory S3 object cursor per bucket/region/prefix, so repeated runs in the same process skip already-processed log files without adding scrape-summary metadata.