Join our Newsletter — 33% off our NHI Course
Home› Guides› AWS Unique Identifier Prefixes: Reading AKIA, ASIA, AROA,…
Guide Cloud & Workload Identity

AWS Unique Identifier Prefixes: Reading AKIA, ASIA, AROA, AIDA and ABIA IDs

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 11 min read
On this page

An analyst looking at a leaked string, a CloudTrail record or a resource policy often has to decide in seconds whether an AWS identifier is a long-term key, a short-lived session key, a role or an IAM user, and the four-character prefix answers that question before any lookup is run. AWS assigns every IAM user, group, role, managed policy, instance profile and server certificate a unique ID, and access key IDs follow the same prefix scheme. This reference lists every prefix AWS documents, explains what each tells you and what it does not, and shows how to use prefixes in detection rules, policy design and leak triage. It is written for cloud security engineers and SOC analysts who work with AWS logs and secret scanning alerts. For how IAM policies and roles work in general, see the AWS IAM Policies and Roles Guide.

This is an independent guide from NHI Mgmt Group, based on AWS's public documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.

Key takeaways

  • AKIA means long-term, ASIA means temporary. AWS states that access key IDs beginning with AKIA are long-term credentials for an IAM user or the root user, and those beginning with ASIA are temporary credentials created by AWS STS.
  • Twelve prefixes are documented. The IAM User Guide lists ABIA, ACCA, AGPA, AIDA, AIPA, AKIA, ANPA, ANVA, APKA, AROA, ASCA and ASIA; treat anything else as unverified and look it up rather than guess.
  • Unique IDs survive name reuse. A deleted user called John and a new user called John share an ARN pattern but never a unique ID, which is why AIDA and AROA IDs matter in resource policies and in your own identity inventory.
  • The prefix tells you type, not state. STS GetAccessKeyInfo returns the owning account for a key ID but, as AWS notes, does not say whether the key is active, inactive or deleted.
  • Triage differs by prefix. An AKIA key needs deactivation and rotation; an ASIA key needs the issuing role's sessions revoked, because deactivating a user key does nothing to a session that has already been issued.

Why prefixes matter

Most day-to-day AWS work uses friendly names and ARNs, and AWS recommends ARNs in policies. Unique IDs earn their place in three situations.

  • Name reuse: friendly names for users, groups, roles and policies must be unique within an account but can be reused after deletion. The IAM User Guide gives the example of a deleted user John whose replacement, also called John, inherits whatever a policy granted to the name. A unique ID such as AIDACKCEVSQ6C2EXAMPLE is never reissued, so a resource policy that names the ID does not silently extend to the new person.
  • Logs: CloudTrail's userIdentity.principalId carries the unique ID. For an IAM user it is the AIDA ID; for an assumed role it is the AROA role ID followed by a colon and the session name, for example AROAIDPPEZS35WEXAMPLE:AssumedRoleSessionName.
  • Leaked strings: secret scanners, paste-site monitoring and incident tickets usually surface an access key ID alone. The prefix tells the responder which playbook to open before anyone has console access.

The unique ID is not shown in the IAM console. Retrieve it with get-user, get-role, get-group, get-policy, get-instance-profile, get-server-certificate or get-caller-identity in the AWS CLI, or the matching IAM and STS API calls.

Prefix table

The table lists the prefixes in the IAM User Guide's "Unique ID prefixes" section, in the same alphabetical order. AWS notes that prefixes may vary based on when a resource was created, so build detections that tolerate older formats.

PrefixResource type (AWS wording)Where you usually see itSecret or identifier?
ABIAAWS STS service bearer tokenaccessKeyId in CloudTrail for services that use bearer tokens, such as CodeArtifactCredential: token valid only for the issuing service and Region
ACCAContext-specific credentialRecords for context-specific credentialsCredential identifier: treat as sensitive until confirmed
AGPAUser groupget-group output, inventory exportsIdentifier only
AIDAIAM userprincipalId for IAMUser events, resource policy Principal, aws:useridIdentifier only
AIPAAmazon EC2 instance profileget-instance-profile outputIdentifier only
AKIAAccess keyCredentials files, environment variables, code repositories, accessKeyId in CloudTrailKey ID of a long-term secret pair
ANPAManaged policyget-policy output (PolicyId)Identifier only
ANVAVersion in a managed policyPolicy version metadataIdentifier only
APKAPublic keyPublic key metadataIdentifier only
AROARoleprincipalId for AssumedRole events (before the colon), resource policies, aws:useridIdentifier only
ASCACertificateCertificate metadataIdentifier only
ASIATemporary (AWS STS) access key IDSession credentials from AssumeRole, GetSessionToken, instance and task roles; accessKeyId in CloudTrailKey ID of a temporary credential, unique only with its secret and session token

Identifier-only prefixes are not secrets. Seeing an AIDA or AROA value in a ticket or a policy file is not an exposure by itself, although it does tell an outsider something about your account structure.

Access keys: AKIA and ASIA

An access key has two parts, the access key ID and the secret access key, and both are needed to sign a request. The ID alone cannot authenticate, but AWS still warns against sharing keys "even to help find your account identifiers", because the pair grants access until revoked.

PropertyAKIA (long-term)ASIA (temporary)
Issued toAn IAM user or the root userA role session, federated user or GetSessionToken caller via AWS STS
PartsKey ID and secret access keyKey ID, secret access key and session token
LifetimeUntil deactivated or deletedUntil the session expires
LimitTwo access keys per IAM userSet by role and session duration settings
Find the ownerCredentials report or list-access-keys per user; root keys via root sign-inSTS events in CloudTrail (AssumeRole and similar) that returned the key ID
ContainDeactivate, rotate, then deleteRevoke the issuing role's active sessions, fix whatever leaked the session
Recover a lost secretNot possible: delete and create a new keyRequest new temporary credentials

AWS recommends temporary credentials such as IAM roles over long-term access keys, so a healthy estate should see the share of AKIA keys in CloudTrail fall over time. See the AWS Access Keys Security Guide for the controls around long-term keys and the AWS STS and AssumeRole Guide for session design.

ABIA bearer tokens: some services, CodeArtifact being AWS's documented example, use bearer tokens instead of Signature Version 4. AWS states that the token's access key ID begins with ABIA so that you can identify these operations in CloudTrail, and that the token works only for the service and Region that issued it. Generating one requires sts:GetServiceBearerToken, so that action is a useful control point. See the AWS CodeArtifact Security guide.

Principals: AIDA, AROA and others

AIDA and AROA are the prefixes analysts meet most often after the key prefixes, because they appear in CloudTrail and in policies.

  • AIDA in policies: a resource-based policy can list a user's unique ID in the Principal element, for example "AIDACKCEVSQ6C2EXAMPLE", so access does not pass to a later user with the same name.
  • AROA with aws:userid: the aws:userid global condition key holds the AIDA ID for an IAM user and AROA...:role-session-name for a role session. A condition such as "AROA1234567890EXAMPLE:*" matches every session of one role, and a specific session name narrows it further. See the AWS IAM Global Condition Keys Reference.
  • Role recreation: deleting and recreating a role with the same name produces a new AROA ID. Policies that reference the old unique ID stop matching, which is a safety feature but can also explain a sudden AccessDenied after an infrastructure rebuild. See the AWS AccessDenied Troubleshooting Guide.
  • ANPA, AGPA, AIPA: useful as stable keys in a configuration database or identity inventory, because names change and are reused while IDs do not.

Unique IDs complement ARNs rather than replacing them. AWS's general advice is to use ARNs in policies, and to reach for unique IDs where name reuse would otherwise grant unintended access.

Using prefixes in detection and leak triage

Detection ideas

SignalPrefix logicWhy it matters
Long-term key use in productionuserIdentity.accessKeyId starts with AKIATracks progress away from static keys; any AKIA use from an unexpected network is a priority
Root key useuserIdentity.type = Root with an AKIA key IDRoot access keys should not exist in normal operation
Bearer token issuanceaccessKeyId starts with ABIAShows which principals obtain service bearer tokens and from where
Session from a known role used off-platformASIA key with a principalId beginning AROA, source IP outside expected rangesPossible stolen session credentials; GuardDuty's InstanceCredentialExfiltration.OutsideAWS finding covers EC2 role credentials
New long-term keysCreateAccessKey events (response contains an AKIA ID)Persistence technique, mapped to ATT&CK T1098.001 Additional Cloud Credentials

Note that CloudTrail may omit accessKeyId or show it as an empty string for security reasons, so rules should fall back to userIdentity.type, principalId and sessionContext. Amazon GuardDuty adds findings such as CredentialAccess:IAMUser/CompromisedCredentials and UnauthorizedAccess:IAMUser/MaliciousIPCaller. See the Amazon GuardDuty Guide.

Leak triage by prefix

  1. Read the prefix. AKIA or ASIA tells you the playbook; an AIDA, AROA or ANPA value on its own is not a credential and needs no rotation.
  2. Confirm ownership. Call STS GetAccessKeyInfo from your own account to return the account ID that owns the key. If it is not yours, report it to the owner through the relevant channel and stop. The call does not indicate whether the key is active.
  3. For AKIA, find the user. Pull a credentials report or search list-access-keys output; check get-access-key-last-used for the last service, Region and time.
  4. For AKIA, contain. AWS's guidance is to create a replacement key, update applications, deactivate the exposed key (do not delete it yet, so you can reactivate if something breaks), then delete it once the new key works.
  5. For ASIA, find the session. Search CloudTrail STS events for the key ID to identify the role and who assumed it, then revoke active sessions. AWS adds an inline policy named AWSRevokeOlderSessions that denies all actions for sessions issued before the revocation time using aws:TokenIssueTime. This does not affect requests signed with long-term IAM user keys, and it cannot be used on service-linked roles.
  6. Review activity. Look for new users, access keys, roles, policies and resources in every Region, and preserve evidence (for example snapshots) before deleting anything. See How to Investigate CloudTrail for a Compromised Access Key.
  7. Respect AWS's quarantine policy. If AWS has attached the AWSCompromisedKeyQuarantineV3 managed policy to an exposed user, do not remove it; follow the instructions in the support case AWS opened.

For the full response sequence across clouds, use the Cloud Access Key Leak Playbook.

Framework mapping

FrameworkReferenceHow prefixes help
MITRE ATT&CKT1552.001 Credentials In FilesScanners flag AKIA and ASIA strings in files and repositories
MITRE ATT&CKT1078.004 Cloud AccountsPrefix and principalId separate user, role and root activity in hunts
MITRE ATT&CKT1098.001 Additional Cloud CredentialsAlert on new AKIA keys created outside approved pipelines
NIST SP 800-53 Rev 5IA-5 Authenticator Management, AC-2 Account ManagementInventory long-term keys and owners by unique ID
NIST SP 800-53 Rev 5AU-6 Audit Record Review, Analysis, and ReportingPrefix-aware CloudTrail rules
NIST CSF 2.0PR.AA-01, DE.CM-03Credentials managed for users and services; activity monitored

Practitioner checklist

  • Add the twelve documented prefixes to your SOC runbook and secret scanning triage notes, with AKIA and ASIA playbooks linked.
  • Build a CloudTrail report of AKIA key use by principal and track it down month on month.
  • Alert on any Root identity using an access key, and on CreateAccessKey outside approved automation.
  • Store AIDA and AROA unique IDs alongside names in your identity inventory so deleted and recreated principals are distinguishable.
  • Use unique IDs in resource policies or aws:userid conditions where name reuse would grant unintended access.
  • Restrict sts:GetServiceBearerToken to principals that need ABIA bearer tokens.
  • Rehearse revoking role sessions with AWSRevokeOlderSessions on a non-production role so the team knows the side effects.
  • Do not treat identifier-only prefixes as secrets in alerting, to keep scanner noise down.

Standards and references

Related NHI Mgmt Group resources: AWS IAM Policies and Roles Guide · AWS Access Keys Security Guide · How to Investigate CloudTrail for a Compromised Access Key · Cloud Access Key Leak Playbook

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.