Skip to main content
This lesson explains identity federation and single sign‑on (SSO) patterns used to manage access across many AWS accounts. Topics covered: identity challenges at scale, federation fundamentals (SAML/OIDC), AWS IAM Identity Center (formerly AWS SSO), permission sets and account assignments, directory integration choices, CLI/programmatic access, automation with CloudFormation, and monitoring/auditing best practices. All diagrams and examples are preserved to illustrate the flows and concepts. Why federate identities? When each AWS account contains its own IAM users, administration and risk scale poorly. Federation and SSO let you reuse an existing corporate identity store, avoid duplicating credentials, and produce auditable temporary credentials across accounts—improving security, compliance, and operational efficiency.
A slide titled "The Identity Management Challenge" showing a comparison: on the left multiple separate IAM users each tied to different AWS accounts, and on the right a federated identity flow from a corporate directory to Single Sign‑On (SSO) into an AWS account. The caption notes that managing many individual IAM users across accounts creates silos and complexity.
Large environments that do not federate identities face significant administrative overhead and operational risk. Many compliance frameworks require integration with corporate identity systems rather than managing separate cloud-only accounts.
A bar chart titled "Scenario: The Identity Management Challenge" (Administrative Overhead Metrics) comparing Federated Users, IAM Users (set 1), and IAM Users (set 2). The bars increase left to right, roughly at 1800, 2500, and 3200 respectively.
Identity federation fundamentals (high level) A typical federation/SSO flow:
  1. User navigates to an application or the AWS console (often via an IAM Identity Center portal).
  2. If needed, the user is redirected to an external Identity Provider (IdP) such as Microsoft AD/ADFS, Okta, or PingFederate for authentication.
  3. The IdP returns an assertion (SAML) or token (OIDC).
  4. AWS Security Token Service (STS) consumes that assertion/token and issues temporary credentials (e.g., via AssumeRoleWithSAML or AssumeRoleWithWebIdentity).
  5. The temporary credentials are used to call AWS APIs and access resources (S3, EC2, etc.).
This model avoids permanent cross-account IAM users and produces short-lived, auditable credentials tied to a trusted authentication event.
A flow diagram titled "Identity Federation Fundamentals" showing a user's browser interacting with an external Identity Provider (IdP) and AWS Security Token Service (STS) to obtain temporary credentials and access AWS resources (S3, EC2, etc.). It labels the steps: user accesses app, redirect to IdP for auth, return SAML/token, STS AssumeRoleWithSAML/WebIdentity, return temporary credentials, and access AWS resources.
Federation types (SAML, OIDC, brokers)
A presentation slide titled "Identity Federation Fundamentals" showing a comparison table of federation types (SAML 2.0, Web Identity Federation, Custom Identity Broker) with descriptions, typical identity providers (e.g., Microsoft ADFS, Google, Facebook, Azure AD) and use cases.
SAML 2.0 federation (enterprise pattern) SAML is the dominant pattern for corporate SSO. In SAML federation:
  • AWS acts as the service provider (SP).
  • The corporate IdP issues signed SAML assertions that AWS trusts.
  • STS uses the assertion to issue role-based temporary credentials.
SAML flows are well supported by enterprise IdPs and provide rich attribute/claim mapping to control role selection and scope.
A diagram of the SAML 2.0 federation login flow showing a user and browser mediating between AWS (service provider) and an Identity Provider (e.g., Active Directory/Okta). The steps annotated are: access AWS, request SAML, redirect to IdP, user authenticates, and return signed SAML assertion.
SAML IdP metadata (example) Below is a truncated IdP metadata fragment. You do not have to memorize metadata, but recognizing the entityID and certificate blocks is helpful when configuring SAML trust with AWS.
Web Identity Federation and Amazon Cognito
  • Web Identity Federation (OIDC/OAuth) enables mobile/web apps to authenticate users with external providers and exchange provider tokens for AWS credentials (via STS).
  • Amazon Cognito provides a managed identity layer. A Cognito Identity Pool maps authenticated users (from Cognito user pools or external IdPs) to IAM roles and then obtains temporary STS credentials.
  • Use Cognito for application-centric authentication, session management, and offline token refresh.
IAM Identity Center (AWS SSO) — centralized multi-account access IAM Identity Center centralizes user/group provisioning, permission sets, and account assignments. Users sign in to a portal, select a target account, and receive temporary credentials derived from assigned permission sets. For multi-account environments, IAM Identity Center is the recommended pattern.
A diagram of AWS Single Sign-On (IAM Identity Center) showing directory sources, the Identity Center and Access Portal, and connections to multiple AWS accounts. Numbered steps on the right describe provisioning, account assignments, user sign-in, permission sets, and access to AWS accounts.
Permission sets and account assignments A permission set is a collection of permissions (managed policies and optional inline policies) that IAM Identity Center translates into a temporary role and policy when a user signs in. Permission sets simplify multi-account access management compared to creating roles manually in each account. Example permission set (YAML-like with inline JSON policy):
Account assignments map a permission set to principals (users or groups) in a specific AWS account:
Permission sets yield consistent permission management and reduce drift across accounts.
An infographic slide titled "Permission Sets and Access Control" that maps three permission sets (DeveloperFullAccess, ReadOnlyQA, ProjectXLimitedAccess) to AWS Account 1–3. It shows those permission sets assigned to groups and a user (group-dev-team, group-qa, user-jdoe) across the accounts.
Directory integration options Common integration approaches:
  • Active Directory integration (AWS Managed Microsoft AD, AD Connector) — best when you need native AD features and domain join.
  • Cloud-native directories and user pools (Amazon Cognito user pools, IAM Identity Center’s built-in directory) — useful for cloud-first or app-focused scenarios.
  • SAML/OIDC providers (Okta, PingFederate, Azure AD) — standard for third-party IdPs and enterprise SSO.
Consider attribute/claim mapping, provisioning (SCIM), authentication flow, MFA, and authorization context when planning integration.
A slide titled "Directory Integration Options" showing three colored columns: "Active Directory Integration," "Cloud-Native Directory Options," and "Synchronization Considerations." Each column lists bullet points like AWS Managed Microsoft AD, AD Connector, IAM Identity Center, Amazon Cognito, SAML providers, and sync items such as provisioning, attribute mapping, authentication flow, and authorization context.
Decision guidance (high level) Use architecture and organizational constraints to select the integration pattern: on-prem AD → AD Connector/Managed AD, cloud-first apps → Cognito/Identity Center, or enterprise SSO → SAML IdP integrations.
A colorful flowchart titled "Directory Integration Options" that guides decisions about whether and how to integrate directories. It uses diamond decision nodes and colored outcome boxes to recommend Active Directory, cloud-native IAM/Cognito/SAML providers, or no integration.
CLI and programmatic access
  • CLI users authenticate via IAM Identity Center using aws sso login, which runs the browser-based SSO/OIDC flow and stores short-lived credentials for subsequent CLI/API calls.
  • Session duration, MFA enforcement, and permission boundaries are configurable at the permission set level.
  • For programmatic flows (server-to-server), use OIDC or AWS STS with appropriate token exchange patterns (e.g., AssumeRoleWithWebIdentity).
Multi-account strategy with AWS Organizations IAM Identity Center is commonly used with AWS Organizations to assign permission sets across multiple accounts (and OUs), simplifying centralized access control and governance.
A diagram titled "Multi-Account Access Strategies" showing a flow: Corporate Identity Provider and Permission Sets feed into AWS IAM Identity Center, which connects to an AWS Organization. The organization branches into OUs (Production, Development, Shared Services, Security) with individual AWS accounts listed under each.
Programmatic multi-account access flow (summary) Authentication usually includes MFA, followed by portal or API-based role selection. STS issues temporary credentials scoped to the permission set and target account, enabling console, CLI, or cross-account API access with reduced blast radius.
A flowchart titled "Multi-Account Access Strategies" showing the user journey across AWS accounts — Programmatic Access Path. It diagrams steps like corporate user → IdP authentication (with MFA) → IAM Identity Center portal → account/permission selection → STS credentials generation → console/CLI access and cross-account resource access/monitoring.
Automation with CloudFormation (permission sets & assignments) You can automate permission set creation and assignments using CloudFormation resources such as AWS::SSO::PermissionSet and AWS::SSO::Assignment. Automation reduces manual errors and ensures repeatable access provisioning. Example CloudFormation snippet (YAML):
Monitoring and auditing federated access
  • AWS CloudTrail records API activity, including STS AssumeRole calls and Identity Center events — make CloudTrail your primary audit trail.
  • Combine CloudTrail with IdP authentication logs and IAM Identity Center access logs for comprehensive authentication+authorization auditing.
  • Use CloudWatch, log analytics (Athena, OpenSearch), or an enterprise SIEM to detect anomalous patterns and support compliance reporting.
A slide titled "Monitoring and Auditing Federated Access" showing a flowchart of log sources (Identity Provider auth logs, CloudTrail federation events, IAM Identity Center access logs, cross-account activity) feeding into security analytics for anomaly detection and into compliance reporting. The diagram illustrates how these inputs support abnormal pattern detection and access reviews.
Best practices (secure, scalable federation)
  • Enforce MFA for all federated access paths.
  • Apply least privilege: design permission sets to grant only the necessary actions.
  • Use short session durations appropriate to risk and consider scoped sessions to limit blast radius.
  • Employ permission boundaries to guard against privilege escalation across accounts.
  • Automate and document identity lifecycle: provisioning, deprovisioning, and access reviews.
  • Ensure CloudTrail is enabled and logs retained per compliance requirements.
  • Integrate SIEM and continuous monitoring to detect anomalous access patterns.
A slide titled "Federation and SSO Best Practices" showing two sections: Security Best Practices and Operational Excellence. It lists recommendations like enforce MFA, least privilege, short sessions, review access regularly, document architecture, and automate identity lifecycle management.
Maturity model (plan improvements over time) Organizations typically progress from basic SAML mappings to standardized use of IAM Identity Center and MFA, then to optimization with least privilege, automation, continuous monitoring, and zero-trust patterns. Use a maturity model to prioritize improvements and track progress.
A slide titled "Federation and SSO Best Practices" showing a four-stage maturity model: Basic Federation, Standardized, Optimized, and Adaptive, each with brief bullet points (e.g., SAML, IAM Identity Center, MFA, least privilege, zero-trust). A colored horizontal progression at the bottom labels the stages as Basic controls, Standardized MFA, Least privilege, and Adaptive security.
Key takeaways
  • STS issues the temporary credentials that enable secure federated access — understand AssumeRoleWithSAML and AssumeRoleWithWebIdentity.
  • IAM Identity Center simplifies multi-account access and works best when combined with AWS Organizations.
  • Focus on core concepts: federation flows, token/assertion exchange, temporary credentials, permission sets, directory integration, and monitoring. Configuration details (metadata fragments, CLI commands, CloudFormation properties) are important to know exist; memorization is rarely necessary for conceptual planning.
Remember: centralized identity (federation + IAM Identity Center) reduces duplication, simplifies auditing, and improves security posture for multi-account AWS environments.

Watch Video