Learning center

Identify the caller behind an assumed-role CloudTrail event

Use the session issuer to identify the IAM role and record the session separately. When different jobs share a role, the issuer alone cannot identify which job made a request.

In a fictional DescribeInstances denial, CloudTrail records the session and its issuing role in separate fields.

FieldRecorded value
userIdentity.typeAssumedRole
userIdentity.arnarn:aws:sts::111122223333:assumed-role/Inventory/scan-42
userIdentity.sessionContext.sessionIssuer.arnarn:aws:iam::111122223333:role/Inventory

Send the role ARN to the policy owner. Use the request ID, time and session details to correlate the event with the job or the recorded role assumption. A session name such as scan-42 can be supplied when a role is assumed. Treat it as a correlation value. If the organization records an enforced source identity, include it with the evidence. CloudTrail user identity reference ยท STS AssumeRole session name and source identity

Read the recorded event from the trail or event store configured for the operation. A current STS caller check can diagnose a credential change since the incident, but it cannot fill a missing historical identity.

Trace another denied request.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading