When it is written
A workload calls IAM Roles Anywhere's CreateSession, signed with the private key of its certificate, naming a trust anchor, a profile and a role (trustAnchorArn, profileArn, roleArn), with an optional session length and role session name. The request carries no IAM credentials: Roles Anywhere validates the signature, checks that a certificate authority configured as a trust anchor in the account issued the certificate, and then assumes the role itself (AWS calls CreateSession an X.509 wrapper around AssumeRole), so the role's trust policy has to let rolesanywhere.amazonaws.com use sts:AssumeRole, sts:SetSourceIdentity and sts:TagSession. It returns a credential set: the assumed role session, temporary credentials, the role and a source identity derived from the certificate, plus the ARN of the subject that records the certificate's authentication history. The session lasts the shorter of the profile's and the request's duration, and the request fails when that is longer than the role's maximum session duration.
AWS's published excerpt of the record shows the certificate in requestParameters.cert, the profile and role ARNs, and the credential set with the session token and with the secret access key written as HIDDEN_DUE_TO_SECURITY_REASONS; it shows neither the record's userIdentity nor its user agent. AWS says CreateSession is not part of any SDK or client; its credential helper and its plugin for the AWS SDK for Java are the documented ways to call it. By default the role session name is the certificate's hex serial number, which ties later calls made with the credentials back to the certificate. A request can set its own roleSessionName when the profile accepts custom session names; the session name then no longer identifies the certificate, and the source identity (the subject's common name) is what remains.
The record of a request that authenticated successfully carries additionalEventData with three signing checks (missingSignedHeaders, postEmptyBody, algorithmMismatch); a client that follows AWS's signing process produces an empty list and false twice. Roles Anywhere leaves the object out when it rejects a request for an invalid signature, an untrusted signing certificate or a revoked certificate, so a record without it points at a request that did not authenticate. A subject common name longer than 256 characters also makes the request fail.
Two other services write the same event name. With event source glue.amazonaws.com, CreateSession starts an AWS Glue interactive session that runs code with the IAM role in its Role parameter; the detection rule for Glue jobs reads that form. With event source s3express.amazonaws.com it is the Amazon S3 call that issues short-lived credentials for a directory bucket, which AWS logs as a data event: a trail records it only when the S3 Express One Zone data events are selected, and Event history does not show it.
How to turn it on
AWS CloudTrail records CreateSession calls to rolesanywhere.amazonaws.com without any setup. Vendor documentation
Management events, which include the IAM, AWS STS and AWS Organizations calls that identity attacks leave behind, are recorded in every account without any setup and stay in Event history for 90 days, per Region. Event history is not a collection point: to keep the records longer, receive them from every Region and account, and send them to a SIEM, create a trail (or a CloudTrail Lake event data store).
- A trail created in the console is multi-Region; an organization trail created in the management account covers every member account.
- A trail records read and write management events by default. Data events (object-level Amazon S3, Lambda invocations and others) are not recorded unless you add them, and they cost extra.
- CloudTrail typically delivers records within an average of about 5 minutes of the API call; AWS does not guarantee the delay.
- Since November 22, 2021, events of global services such as IAM, AWS STS and CloudFront are recorded in US East (N. Virginia): a single-Region trail in another Region no longer receives them. Use a multi-Region trail.
aws cloudtrail describe-trails --include-shadow-trailsaws cloudtrail get-trail-status --name <trail-name>aws cloudtrail get-event-selectors --trail-name <trail-name>aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=CreateSession --max-results 5Fields
The operation’s own fields first, then the fields every AWS CloudTrail record has. Field names are the JSON paths of the record as the vendor documents it.
| Field | What it holds |
|---|---|
requestParameters. | The certificate the workload presented, as in AWS's example record. |
requestParameters. | The profile used, as in AWS's example record. A request can name the profile by its canonical ARN or its alias ARN, and AWS says an alias ARN appears as such in the record. |
requestParameters. | The role whose credentials were requested, as in AWS's example record. |
requestParameters. | The trust anchor that validated the certificate, by canonical or alias ARN. The record path follows the API name and is not shown in AWS's excerpt. |
responseElements. | The credentials returned: the assumed role session (assumedRoleUser), the access key ID, session token and expiry, the role and the source identity from the certificate. The source identity is CN= and the subject's common name when that has at most 61 characters, ID= and the hex serial number when the certificate has no common name, and the bare common name when it has 62 to 256 characters. |
additionalEventData. | Of the headers Roles Anywhere requires the signature to cover (host, x-amz-x509, x-amz-x509-chain, x-amz-date, content-type), the ones that were on the request but not signed. An empty list means every checked header was signed. |
additionalEventData. | true when the request was a POST with a query string and an empty body, which marks a client that sends the parameters in the query string instead of the JSON body. |
additionalEventData. | true when the signing algorithm declared in the Authorization header does not fit the key type of the certificate, or when the declared digest is not SHA-256. |
Fields every AWS CloudTrail record has (23)
| Field | What it holds |
|---|---|
eventVersion | Version of the record format, major and minor (for example 1.11). A new minor version only adds fields. |
eventTime | When the request was completed, in UTC, from the clock of the host that served the API endpoint. |
eventSourceRead by 2 rules | The service the request was made to, usually its short name plus .amazonaws.com (iam.amazonaws.com). |
eventNameRead by 2 rules | The API action that was requested. The operation this page is about. |
awsRegion | The Region the request was made to. Most global service events (IAM, for example) are logged as occurring in us-east-1. |
sourceIPAddress | The address the request came from. For a call made by an AWS service on your behalf it holds the service's DNS name, and AWS Internal for calls AWS makes. |
userAgent | The client that made the request (the console, an SDK, the AWS CLI, or the calling service), as the client reports it. |
userIdentity. | The kind of identity that made the request (Root, IAMUser, AssumedRole, FederatedUser, AWSService, IdentityCenterUser and others). |
userIdentity. | ARN of the identity that made the request; for an assumed role, the role session (assumed-role/<role>/<session>). |
userIdentity. | The account that owns the identity that made the request. |
userIdentity. | The access key that signed the request; an ASIA prefix marks temporary credentials, AKIA a long-term key. |
userIdentity. | For temporary credentials, the role (or user) that issued the session. |
errorCode | The AWS error when the request failed (AccessDenied, NoSuchEntity...); absent when it succeeded. |
errorMessage | The description of the error, including authorization failures. |
requestParameters | The parameters sent with the request, as the service's API reference documents them. |
responseElements | What the service returned for an action that changes something; null for read-only calls and for actions that return nothing. |
requestID | The identifier the service gave the request. |
eventID | A GUID CloudTrail gives each record, unique per event. |
readOnly | Whether the operation only reads (true) or changes something (false). |
eventType | How the record was produced, AwsApiCall for an API call. |
managementEvent | Whether the record is a management event. |
recipientAccountId | The account that received the record; differs from userIdentity.accountId when another account acted on your resource. |
eventCategory | The event category, Management for management events. |
Values to know
eventSource
| Value | Meaning | Signal |
|---|---|---|
rolesanywhere.amazonaws.com | A certificate was exchanged for role credentialsRead by the Roles Anywhere detection rule. | Worth knowing |
glue.amazonaws.com | An AWS Glue interactive session was started with a roleRead by the rule on roles passed to Glue. | Worth knowing |
s3express.amazonaws.com | Amazon S3 issued session credentials for a directory bucketA data event of S3 Express One Zone, recorded only by a trail that selects those data events. | Worth knowing |
Volume and noise
Medium where workloads outside AWS use Roles Anywhere, since each refreshes its credentials regularly; none elsewhere. A session for a certificate that was not seen before, for a privileged role, or from an address outside the workload's network is the record to read first.
Keeping it manageable
- Track the certificates seen per profile (the source identity and, unless the profile accepts custom session names, the session name); a certificate never seen before is what the rule's detection logic looks for.
- Compare
requestParameters.roleArnwith your list of privileged roles and with the roles the workload normally uses. - Separate the services by
eventSource: Glue interactive sessions are read by the rule on roles passed to Glue, not by the Roles Anywhere rule, and the S3 Express One Zone sessions are data events of directory buckets. - Review records without
additionalEventData(AWS adds it only when the request authenticated) and records where it flags a signing check, which AWS offers as the way to find clients that do not sign the way its process describes.
Sample event
A AWS CloudTrail record in the vendor’s format, with made-up values.
{
"eventVersion": "1.11",
"eventTime": "2026-11-18T09:30:12Z",
"eventSource": "rolesanywhere.amazonaws.com",
"eventName": "CreateSession",
"awsRegion": "us-east-1",
"sourceIPAddress": "203.0.113.24",
"requestParameters": {
"cert": "MIIBszCCAVmgAwIBAgIUEXAMPLECERTIFICATEDATA",
"profileArn": "arn:aws:rolesanywhere:us-east-1:111122223333:profile/00000000-0000-0000-0000-00000000dddd",
"roleArn": "arn:aws:iam::111122223333:role/onprem-backup-writer",
"trustAnchorArn": "arn:aws:rolesanywhere:us-east-1:111122223333:trust-anchor/00000000-0000-0000-0000-00000000ffff"
},
"responseElements": {
"credentialSet": [
{
"assumedRoleUser": {
"arn": "arn:aws:sts::111122223333:assumed-role/onprem-backup-writer/00a1b2c3d4e5f6a7b8c9"
},
"credentials": {
"accessKeyId": "ASIAEXAMPLEROLESANY1",
"expiration": "2026-11-18T10:30:12Z",
"secretAccessKey": "HIDDEN_DUE_TO_SECURITY_REASONS",
"sessionToken": "IQoJb3JpZ2luX2VjEXAMPLESESSIONTOKEN"
},
"roleArn": "arn:aws:iam::111122223333:role/onprem-backup-writer",
"sourceIdentity": "CN=backup01.corp.example.com"
}
]
},
"requestID": "6f1c2d3e-4a5b-4c6d-8e9f-0a1b2c3d4e5f",
"eventID": "0b9e8d7c-6a5f-4e3d-9c2b-1a0f9e8d7c6b",
"readOnly": false,
"eventType": "AwsApiCall",
"managementEvent": true,
"recipientAccountId": "111122223333",
"eventCategory": "Management",
"additionalEventData": {
"missingSignedHeaders": [],
"postEmptyBody": false,
"algorithmMismatch": false
}
}Attacks this event reveals
Detection rules that read this event:
References
- IAM Roles Anywhere CreateSession API (AWS)
- Logging IAM Roles Anywhere API calls using AWS CloudTrail (AWS)
- The IAM Roles Anywhere trust model (AWS)
- Using aliases for trust anchors, profiles, and CRLs, IAM Roles Anywhere (AWS)
- CreateProfile, IAM Roles Anywhere API Reference (AWS)
- Extend AWS IAM roles to workloads outside of AWS with IAM Roles Anywhere (AWS Security Blog)
- CreateSession, AWS Glue API Reference (AWS)
- Amazon S3 CloudTrail events (AWS)
- CloudTrail log file examples for directory buckets (AWS)