Skip to Content
Asterrr's Handbook
2 · Incident response

AWS CloudTrail

API activity logging, event types, event history, Lake, central multi-account trails and log file integrity validation.

The decision: which CloudTrail feature gives you the evidence you need (event type, where to read it, how to centralize it) and how do you prove the logs were not altered?

CloudTrail records API and console activity as events. It answers who did what, from where, and when. It does not look inside your workloads and does not alert on its own.

AWS OrganizationsLog archive accountcreated in memberslogs + digestsSQLMember trailcopyOrganizationtrailLog bucketCloudWatch LogsAthena queryEventBridge
An organization trail delivers every member account's events to one log archive bucket. Digest files prove the logs were not altered.

Event types

TypeWhat it coversDefault
Management eventsControl plane calls such as RunInstances, IAM changes, console sign-inLogged by default
Data eventsData plane calls such as S3 object-level API and Lambda invocationsOff, extra charge
Network activity eventsAPI calls made through your VPC endpointsOff, extra charge
Insights eventsUnusual API call volume or error rates compared with a baselineOff, extra charge

Where to read events

OptionRetention and scopeUse it for
Event historyLast 90 days of management events, one Region at a time, no setupQuick lookup, filter read-only or write-only events
Trail to S3Whatever the bucket retains. Typically delivered within about 5 minutes of the callLong-term archive, Athena queries
Trail to CloudWatch LogsMetric filters, alarms, Logs InsightsNear real-time alerting
CloudTrail Lake event data storeImmutable, SQL queries. Up to 3,653 days with one-year extendable pricing or 2,557 days with seven-year pricingInvestigations across accounts and Regions without ETL

Legacy

CloudTrail Lake stopped accepting new customers on May 31, 2026. Existing customers keep using it. For new setups the exam answer is still a trail to S3 queried with Athena.

Central logging

GoalHow
All Regions in one accountMulti-Region trail. Use aws cloudtrail update-trail --name <t> --is-multi-region-trail to convert a single-Region trail. You manage it from its home Region only
All accounts in one bucketOrganization trail from the management account or a delegated administrator. A copy of the trail appears in each member account
Accounts outside an organizationEdit the central bucket policy. Allow cloudtrail.amazonaws.com s3:GetBucketAcl on the bucket and s3:PutObject on each AWSLogs/<account-id>/* prefix with condition s3:x-amz-acl = bucket-owner-full-control. Then point each account's trail at that bucket

Up to five trails per Region per account. A multi-Region trail counts as one in each Region.

Exam trap

A trail can deliver to an S3 bucket or SNS topic in another account, but a CloudWatch Logs log group must be in the same account as the trail.

Log file integrity validation

  • CloudTrail hashes each log file with SHA-256. Every hour it writes a digest file that lists those hashes and signs it with SHA-256 with RSA.
  • Digest files go in a separate folder of the same bucket. Each digest embeds the signature of the previous one, so a deleted log or a gap is detectable.
  • Validation detects modification, deletion and forged files. It does not prevent them. Protect the bucket with a restrictive policy, S3 Object Lock or MFA Delete, and a separate account.
  • Enable it per trail, then check files with aws cloudtrail validate-logs.

Missing or broken delivery

SymptomLikely cause
Nothing reaches S3Bucket policy lacks the CloudTrail statements, wrong account ID in the prefix, trail logging stopped
Nothing reaches CloudWatch LogsThe trail's IAM role lacks logs:CreateLogStream and logs:PutLogEvents, or the log group is in another account
Large events absentCloudWatch Logs and EventBridge accept at most 256 KB per event, CloudTrail skips larger ones for them
No object-level S3 historyData events were never enabled

Further reading

On this page