Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Choose your certification →

Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.3.1.7. Workload Identities for Hybrid and Multi-Cloud (IAM Roles Anywhere, OIDC Federation)

3.3.1.7. Workload Identities for Hybrid and Multi-Cloud (IAM Roles Anywhere, OIDC Federation)

💡 First Principle: A workload outside AWS should prove its identity with something it already has, such as a certificate from your PKI or a token from its own platform, and swap it for short-lived AWS credentials, so that no long-lived access key ever exists to leak.

Pick the mechanism by the identity the workload already holds:
WorkloadIdentity it already hasAWS mechanism
On-premises servers, VMs or containers enrolled in a corporate PKIX.509 certificate from your CA or "AWS Private CA"IAM Roles Anywhere
CI/CD systems (GitHub Actions, GitLab), workloads in another cloud (an Azure managed identity, a Google Cloud service account)Signed OIDC token from that platformIAM OIDC identity provider + a role assumed with AssumeRoleWithWebIdentity
Kubernetes outside EKSService-account token (OIDC issuer) or a workload certificateOIDC federation or Roles Anywhere (EKS Pod Identity is EKS-only)
An AWS workload that must call another cloud or a SaaS APIIts IAM roleIAM outbound identity federation: sts:GetWebIdentityToken returns a signed JWT the external service verifies
PeopleCorporate directoryIAM Identity Center (workforce), not a workload mechanism
How IAM Roles Anywhere works:
  • Trust anchor: a reference to your CA (an "AWS Private CA" or an uploaded external CA certificate bundle). Any certificate that chains to it can authenticate.
  • Profile: names the roles that may be assumed, an optional session policy that caps the permissions, and the session duration.
  • Role trust policy: trusts rolesanywhere.amazonaws.com for sts:AssumeRole, sts:TagSession and sts:SetSourceIdentity. Roles Anywhere maps the certificate's Subject, Issuer and SAN fields to session tags (aws:PrincipalTag/x509Subject/CN, .../x509Subject/OU, .../x509SAN/URI for a SPIFFE ID). Add conditions on these tags and on aws:SourceArn (the trust anchor) so only the intended certificates can use each role.
  • On the host: the credential helper signs a CreateSession request with the private key (which can stay in a TPM or PKCS#11 module) and plugs into the SDK through credential_process. Revocation works through a certificate revocation list you import; Roles Anywhere does not call CRL distribution points or OCSP.
  • Resources are Regional and per account, and trust is account-wide unless trust-policy conditions narrow it.

OIDC federation details: create the IAM OIDC provider for the issuer (for GitHub Actions token.actions.githubusercontent.com) and condition the role on the token's aud and sub claims, for example repo:org/app:ref:refs/heads/main, so only that repository and branch can deploy. Matching on the issuer alone would let any repository on the platform assume the role.

Outbound identity federation (the reverse direction): after you enable it, the account gets an issuer URL; IAM policies decide which roles may call sts:GetWebIdentityToken and for which audiences, signing algorithms and lifetimes; and the external provider trusts that issuer. Those tokens cannot be used to sign in to AWS.

⚠️ Exam Trap: A trust anchor trusts every certificate its CA issues. Without trust-policy conditions on certificate attributes, any server holding a corporate certificate can assume the role. A session policy on the profile limits what the session can do, not who can obtain it.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned