CloudTrail event records and userIdentity

What each field of a CloudTrail record means — eventSource, eventName, errorCode and errorMessage, requestParameters and responseElements (and when they are omitted), sourceIPAddress for console and AWS-internal calls, readOnly, eventCategory, recipientAccountId and sharedEventID across accounts — and every userIdentity type, with the fields that tie an assumed-role session back to a person, a CI run or a service (sessionIssuer, sourceIdentity, invokedBy, onBehalfOf).

markdownreferencev4K26T-NN3Mstage: referencetrust: officialservice: cloudtrailinterface: anyCloudTrail record fieldseventSourceeventNameerrorCodeerrorMessagerequestParametersresponseElements nullsourceIPAddress AWS InternaluserAgentreadOnlyeventCategorymanagementEventrecipientAccountIdsharedEventIDvpcEndpointIdVpceAccessDeniedtlsDetailsuserIdentity typeAssumedRolesessionIssuersourceIdentityinvokedByonBehalfOf IdentityCenterUsercredentialIdinScopeOfWebIdentityUserSAMLUsereventVersion 1.11role chaining CloudTrail

Created 18 Oct 2026 · Modified 23 Oct 2026 · 4 versions

Three fields answer most questions: eventName (what was done), userIdentity (who did it), and errorCode (whether it failed, and how). Record format version 1.11 is current. Minor versions only add fields; a new major version would break parsers.

Record fields

FieldMeaning
eventTimeWhen the request completed (UTC), as recorded by the API host
eventSourceThe service, as <service>.amazonaws.com. Watch for exceptions: CloudWatch is monitoring.amazonaws.com
eventNameThe API action, for example DeleteBucket
awsRegionThe Region the request was sent to
sourceIPAddressThe caller's IP. For console actions, it is the IP of the user's own resource, not the console server. Calls from services inside AWS show a DNS name, and AWS-originated events usually show AWS Internal/#
userAgentThe client (console, SDK, CLI or service), up to 1 KB
errorCodePresent only on failure: the service's error code (up to 1 KB). VPC endpoint policy denials show VpceAccessDenied. Some services report errors inside responseElements instead
errorMessageThe failure description, including authorization failure messages (up to 1 KB). VPC endpoint denials always say "The request was denied due to a VPC endpoint policy."
requestParametersWhat the caller sent. Omitted over 100 KB
responseElementsWhat create, update and delete calls returned. null for read-only calls and for calls that return nothing; omitted over 100 KB
additionalEventDataExtra data, for example MFAUsed on console sign-in
requestID / eventIDThe service's request ID (for AWS Support) / CloudTrail's unique event ID
eventTypeAwsApiCall, AwsServiceEvent, AwsConsoleAction, AwsConsoleSignIn or AwsVpceEvents
readOnlytrue for reads such as Describe*, false for writes
eventCategory / managementEventManagement, Data or NetworkActivity / a boolean (version 1.06 and later)
recipientAccountIdThe account that received the call. It differs from userIdentity.accountId on cross-account access
sharedEventIDThe same GUID on the copies of one cross-account action delivered to each account. Absent when caller and owner are the same account
vpcEndpointIdThe interface endpoint the call came through
tlsDetailsTLS version, cipher suite and clientProvidedHostHeader. Absent for calls AWS services make for you
sessionCredentialFromConsolePresent (true) when console session credentials were used through a proxy or external client

userIdentity.type

The type names come from the userIdentity reference. The short descriptions of Role, FederatedUser, AWSAccount, AWSService and Directory are the hub's reading of those names.

TypeWho
RootThe account root user
IAMUserAn IAM user's long-term keys or console password
AssumedRoleTemporary credentials from AssumeRole*: the most common type for workloads, CI and SSO
RoleA role identity in some service-made events
FederatedUserGetFederationToken credentials
IdentityCenterUserAn IAM Identity Center user (with onBehalfOf.userId and identityStoreArn)
AWSAccount / AWSServiceAnother account / an AWS service principal
Directory, BuilderIdUser, UnknownDirectory service users, AWS Builder ID, unidentified
SAMLUser / WebIdentityUserAppear on AssumeRoleWithSAML / AssumeRoleWithWebIdentity events themselves

Fields that identify a session

  • arn: for AssumedRole, arn:aws:sts::<account>:assumed-role/<RoleName>/<SessionName>.
  • principalId: <role-id>:<SessionName> (the role ID starts AROA).
  • accessKeyId: the temporary key that signed the call. It can be empty. All calls made with one session share it.
  • sessionContext.sessionIssuer: type, arn, principalId, accountId and userName of the role that issued the session. This is where the role name lives for AssumedRole.
  • sessionContext.attributes: creationDate (when the credentials were issued) and mfaAuthenticated.
  • sessionContext.sourceIdentity: the original identity, carried through role chains, but only if administrators have configured STS to require a source identity.
  • sessionContext.signInSessionArn: a console sign-in session, which can be audited or revoked.
  • sessionContext.webIdFederationData: the identity provider details for web-identity sessions, such as GitHub OIDC.
  • invokedBy: the AWS service that made the request for you. It appears with service roles, service-linked roles and forward access sessions.
  • inScopeOf: on service-to-service calls, sourceArn, sourceAccount, issuerType and credentialsIssuedTo.
  • credentialId: set when a bearer token, such as an Identity Center access token, was used.

Following a chain

Example: GitHub OIDC → CI role → CDK deploy role → CloudFormation execution role.

  1. The resource's event (for example CreateFunction) shows the role that made the call in sessionContext.sessionIssuer.arn. For a CloudFormation stack with a service role, that is the execution role, and invokedBy names the service. CloudFormation's session name for that role isn't documented on the fetched pages.
  2. Search for the AssumeRole event that issued that session: same role and session name, around creationDate. Matching on the access key in its responseElements is the hub's method; the page suggests matching on accessKeyId, creationDate and sessionIssuer. Its userIdentity is the next link up, for example the CDK deploy role or your CI role.
  3. Repeat until you reach an AssumeRoleWithWebIdentity event (CI: webIdFederationData names the provider) or an Identity Center or IAM user.

Configuring sourceIdentity saves this walk: every downstream event carries the original identity.

Read this document as markdown — the same bytes an agent receives.