Reading a CloudTrail Event Record
Decode the JSON fields that describe who made each call.
Reading a CloudTrail Event Record is a free AWS Security Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Anatomy of an Event
A CloudTrail event is a JSON record with a consistent set of fields. Learning to read it lets you reconstruct exactly what happened during an investigation.
Each record describes one API call: who made it, what they did, when, from where, and what the result was.
The userIdentity Field
The most important field for security is userIdentity. It describes the principal that made the call — its type (IAMUser, AssumedRole, Root, AWSService), account, and ARN (Amazon Resource Name).
This is how you attribute an action to a specific person, role, or service with confidence.
"userIdentity": {
"type": "AssumedRole",
"arn": "arn:aws:sts::1111:assumed-role/Admin/alice"
}Event Name and Source
eventName is the API action that was called, like DeleteBucket or RunInstances, and eventSource is the service it belongs to, such as s3.amazonaws.com.
Together they tell you precisely what operation occurred, which is the heart of understanding any event.
Time, Region, and IP
The eventTime timestamp (in UTC), awsRegion, and sourceIPAddress place the call in time and space.
A call from an unexpected region or an unfamiliar IP is a classic red flag. The user agent field adds how the call was made — console, CLI, or SDK.
Request and Response
The requestParameters show the inputs to the call — which bucket, which instance, which policy — and responseElements show what AWS returned, like a newly created resource ID.
These let you see exactly what was changed and the outcome, not just that something happened.
Errors Tell Stories
If a call was denied, the record includes errorCode and errorMessage, such as AccessDenied.
A burst of denied calls from one principal often means an attacker probing what a stolen credential can do. Failed events are as investigatively valuable as successful ones.
Role Chains
When access comes through assumed roles, follow the chain. The userIdentity may show an assumed-role session, and sessionContext reveals the underlying principal that assumed it.
Tracing this chain answers who ultimately performed an action even when several role hops are involved.
Read-Only and Management Flags
Fields like readOnly and managementEvent tell you the nature of the call at a glance — whether it changed anything and whether it is a control-plane operation.
These help you filter quickly to the events that altered your environment when scanning a flood of records.
Querying Records at Scale
Reading one record by hand is fine; sifting millions is not. Send logs to CloudWatch Logs or query the S3 archive with Athena using SQL.
You can filter on userIdentity, eventName, sourceIPAddress, or errorCode to pinpoint exactly the calls that matter in an investigation.
Watch the User Agent
The userAgent field reveals how a call was made — the AWS console, a specific CLI version, an SDK, or an automation tool.
An unexpected user agent can hint at attacker tooling. A call that normally comes from the console suddenly arriving via a raw SDK from an odd IP is the kind of subtle anomaly worth a second look.
Putting It Together
To investigate, combine fields: who (userIdentity) did what (eventName) to which resource (requestParameters), when (eventTime), from where (sourceIPAddress), and with what result (responseElements or errorCode).
That full picture, drawn from one record, is the essence of API-activity forensics on AWS.
Quick Check
Find the attribution field.
Recap
A CloudTrail event is a JSON record whose key fields answer a full investigation: userIdentity (who, with ARN and role chain via sessionContext), eventName/eventSource (what), eventTime/awsRegion/sourceIPAddress (when and where), and requestParameters/responseElements or errorCode (the change and result). Failed AccessDenied events are valuable signals, and Athena lets you query records at scale.
Frequently asked questions
Is the “Reading a CloudTrail Event Record” lesson free?
Yes — the full text of “Reading a CloudTrail Event Record” is free to read here on the web, and the AWS Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Security Academy course, upgrade to CoddyKit PRO.
What will I learn in “Reading a CloudTrail Event Record”?
Decode the JSON fields that describe who made each call. You practise AWS Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start AWS Security Academy?
No prior experience is required. AWS Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Reading a CloudTrail Event Record” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this AWS Security Academy lesson?
Yes. Every AWS Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- What CloudTrail Records
- Management, Data, and Insight Events
- Organization Trails Across Accounts
- Reading a CloudTrail Event Record