Investigating AWS CloudTrail
How CloudTrail records API activity, what event history, trails and data events do and do not keep, reading userIdentity and access key types, the event names that mark an intrusion, and querying with Athena and CloudTrail Lake to rebuild what a leaked key did.
01What CloudTrail records, and what it does not
- Know what event history, trails and data events keep, and for how long
- Read a CloudTrail record: userIdentity, access key type, source IP and errors
- Recognise the event names that mark credential abuse, persistence and defence evasion
- Rebuild what a leaked key did with Athena or CloudTrail Lake
AWS CloudTrail records API calls made in an account: by the console, the CLI, SDKs and AWS services acting for you. Every action in AWS is an API call, so CloudTrail is the closest thing to a complete audit trail the cloud offers, provided it was configured before the incident.
| Feature | What it keeps | Gotcha |
|---|---|---|
| Event history | 90 days of management events, per region, free and always on | Searchable in the console with limited filters; no data events; regional |
| Trail | Management events (and optionally data events) delivered to S3, and optionally CloudWatch Logs | Must be created; multi-region and organisation trails are what you want |
| Data events | Object-level and data-plane calls: S3 GetObject and PutObject, Lambda Invoke, DynamoDB items | Off by default and billed per event; without them you cannot say which S3 objects were read |
| CloudTrail Lake | Events stored in an event data store queryable with SQL | Retention set per data store; extra cost |
| Insights | Unusual API call rates or error rates | Must be enabled per trail |
The most common gap in cloud cases: an attacker listed and downloaded an S3 bucket, and the account had only management events. You will see ListBuckets and maybe GetBucketPolicy, but not one GetObject. S3 server access logs, if enabled, are the fallback. Check what was logged before you promise anyone an answer about data.
This is an advanced module
Cloud & identity incident response is part of the Pro pass. 4 more sections — the deep dives, the final design, follow-ups and the test — unlock with it.
Already a cyart.io or studio.cyart.io member? Your pass code is in your Studio account.