Federation moves the identity store off AWS and turns every AWS sign-in into an exchange of a third-party assertion for a temporary AWS credential. The right federation surface depends on who the principal is. Workforce users (employees, contractors with corporate identities) belong in AWS IAM Identity Center, which fronts the customer's external IdP through SAML 2.0 or OIDC and assigns permission sets to accounts in the organization. Customer-facing application users belong in Amazon Cognito user pools, which authenticate against social IdPs, SAML, OIDC, or a built-in directory and issue OIDC tokens that the application validates. Workloads outside AWS (servers in another cloud, on-premises Kubernetes, build runners) belong in IAM Roles Anywhere when they hold an X.509 certificate from a trusted private CA, or in OIDC federation when the workload's environment exposes a verifiable OIDC token (GitHub Actions, GitLab, Bitbucket, EKS service accounts). AWS Directory Service supplies the directory itself when the workload needs a Microsoft Active Directory schema (AWS Managed Microsoft AD), a one-way trust to on-premises AD, or a lightweight LDAP-compatible directory (Simple AD, AD Connector).
The IAM Identity Center model centralizes assignment. The organization picks one identity source: the built-in store, an external SAML 2.0 IdP, or AWS Managed Microsoft AD. Permission sets are templates that translate to an IAM role in each target account. When a user signs in, Identity Center provisions or updates a role named AWSReservedSSO_<permission-set>_<random> in the target account and the user assumes it through SAML federation. The permission set carries an inline policy plus up to ten attached managed policies, plus an optional permissions boundary; the maximum session duration ranges from 1 to 12 hours and applies to the resulting role. Cross-account access in a SAML-federated organization avoids long-lived IAM users almost entirely. The trust policy of the generated role points at the SAML provider that Identity Center registered, and SCIM keeps the user-and-group mapping current.
SAML 2.0 federation outside Identity Center is still in scope for workloads that need to call the AWS API from an SSO portal that lands directly on signin.aws.amazon.com/saml. The customer registers the IdP as a SAML provider object in IAM, builds an IAM role whose trust policy allows sts:AssumeRoleWithSAML for that provider, and sets Condition blocks that require SAML:aud to equal https://signin.aws.amazon.com/saml. The IdP includes attribute statements that Identity Center or the role read: https://aws.amazon.com/SAML/Attributes/Role selects the role and provider, Role/SessionName populates aws:userid, and SessionDuration overrides the role's default up to its MaxSessionDuration. OIDC federation works the same way through sts:AssumeRoleWithWebIdentity, with the IdP registered as an OIDC provider whose thumbprint pins the JWKS signing chain.
Amazon Cognito separates the two halves of customer identity. A user pool is an OIDC-compliant authentication store; it issues ID, access, and refresh tokens after the user signs in with username and password, MFA, a social provider, or a SAML or OIDC enterprise IdP. An identity pool is the AWS authorization layer; it exchanges an OIDC token (from a Cognito user pool, a third-party IdP, a developer-authenticated identity, or an anonymous guest) for an STS credential through sts:AssumeRoleWithWebIdentity. The two are independent objects. A mobile application that calls DynamoDB directly needs both: the user pool to log the user in, and the identity pool to mint the AWS credential that signs the DynamoDB request. A web application that calls its own backend needs only the user pool, because the backend signs AWS requests with its own role.
AWS Directory Service supplies the directory infrastructure that the previous patterns assume. AWS Managed Microsoft AD is a managed multi-master AD in two Availability Zones, with optional trusts to on-premises forests. It backs Identity Center as an identity source, joins Amazon EC2 Windows instances to a domain, supports RDS for SQL Server Windows authentication, and integrates with Amazon WorkSpaces. AD Connector is a proxy that forwards directory traffic to an existing on-premises AD without replicating credentials. Simple AD is a Samba-based directory for low-cost LDAP workloads. The Directory Service quotas matter: AWS Managed Microsoft AD Standard supports up to 5,000 users; Enterprise supports up to 500,000 users with directory sharing across accounts.
Identity source selection and the federation chain
Implement application-level authorization with Amazon Verified Permissions and IAM Roles Anywhere
Application-level authorization sits one layer above AWS IAM. IAM controls which AWS API calls a principal can make; an application still has to decide whether the authenticated user can edit document 42 or only read it. Amazon Verified Permissions is a managed Cedar policy engine that the application calls through IsAuthorized or IsAuthorizedWithToken. Policies are written in Cedar and stored in a policy store. The application sends a request triple of principal, action, and resource plus optional context (IP address, MFA assertion); Verified Permissions returns ALLOW or DENY with the matching policy IDs. The integration with Cognito user pools is direct: IsAuthorizedWithToken accepts the Cognito ID or access token, extracts the user's groups, and matches them against principal references in the Cedar policy, removing the need for the application to parse JWTs.
{
"policyStoreId": "DocsApp",
"policy": "permit(principal in Group::\"editors\", action in [Action::\"WriteDoc\"], resource) when { resource.owner == principal && context.mfa_present };"
}
IAM Roles Anywhere lets a workload outside AWS obtain temporary AWS credentials by presenting an X.509 certificate signed by a trust anchor that points at an AWS Private CA or an external CA whose certificate the customer registers. The components are a trust anchor (the CA reference), a profile (the IAM roles the workload may assume and the session policies attached), and the role itself (with a trust policy that allows rolesanywhere.amazonaws.com to call sts:AssumeRole plus the sts:SetSourceIdentity and sts:TagSession actions required by Roles Anywhere). The workload runs the aws_signing_helper to mint a SigV4 request signed by the certificate's private key; Roles Anywhere validates the certificate chain, applies the trust anchor's notification settings, and returns short-lived credentials.
aws_signing_helper credential-process \
--certificate /etc/cert.pem \
--private-key /etc/key.pem \
--trust-anchor-arn arn:aws:rolesanywhere:us-east-1:111122223333:trust-anchor/abcd \
--profile-arn arn:aws:rolesanywhere:us-east-1:111122223333:profile/efgh \
--role-arn arn:aws:iam::111122223333:role/AppRole \
--session-duration 3600
💡 Exam Trap: Identity Center permission sets surface as IAM roles named
AWSReservedSSO_<name>_<random>in each target account. The maximum session duration is set on the permission set, not on the role; modifying the role'sMaxSessionDurationdirectly is overwritten on the next sync.
💡 Exam Trap: Cognito user pools issue OIDC tokens; identity pools mint AWS credentials. A workload that calls DynamoDB directly from a browser needs the identity pool path. A workload that calls a backend that calls DynamoDB only needs the user pool.
⚠️ Anti-Pattern: Registering an OIDC provider in IAM without pinning the JWKS thumbprint to the IdP's signing certificate breaks signature validation when the IdP rotates keys. Pin the thumbprint and update it as part of the IdP's certificate rotation plan, or accept that AWS validates only against the registered thumbprint list.
🎯 Scenario: A team builds a SaaS portal where end users sign in and call DynamoDB directly. The team picks a Cognito user pool plus a Cognito identity pool, attaches a role whose policy uses
${cognito-identity.amazonaws.com:sub}in the resource ARN to scope each user to their own item partition, and bypasses any need to ship long-lived IAM credentials to the browser.
Decision Anchor: Choose IAM Identity Center when the principals are workforce users with a corporate IdP. Choose Amazon Cognito user pools when the principals are customers of the application. Choose IAM Roles Anywhere when the workload runs outside AWS but holds an X.509 certificate. Choose an IAM OIDC provider when the workload's runtime publishes an OIDC token (GitHub Actions, GitLab, EKS service accounts) and a certificate is overkill.
