Study guide
14.3 IAM Identity Center, Cross-Account Roles & STS Session Policies
AWS Certified DevOps Engineer – Professional Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: CI/CD Pipeline Architecture & Source Integration
1.1 Multi-Stage & Multi-Account CodePipeline Design 1.2 CodeBuild Projects, Build Environments & Pipeline Secrets 1.3 Source Control Workflows, Webhooks & Branching Models
2 Chapter 2: Automated Testing, Test Gates & Quality Verification
2.1 Automated Unit, Integration & Acceptance Testing in Pipelines 2.2 Load Testing, Performance Benchmarking & Synthetic Canaries 2.3 Security Scanning, SAST/DAST & Approval Gates
3 Chapter 3: Artifact Management & Multi-Platform Deployment Strategies
3.1 Artifact Lifecycle Management with CodeArtifact, ECR & S3 3.2 Automated Image Baking with EC2 Image Builder 3.3 In-Place, Rolling & Immutable Deployments on EC2 3.4 Blue/Green & Canary Deployments for ECS, EKS & Lambda
4 Chapter 4: CloudFormation, CDK & Reusable IaC Components
4.1 Advanced CloudFormation: Nested Stacks, Change Sets & Custom Resources 4.2 Cross-Account & Multi-Region StackSets & Drift Detection 4.3 Modern IaC: AWS CDK, SAM & Service Catalog Governance
5 Chapter 5: Multi-Account Architecture, Organizations & Control Tower
5.1 AWS Organizations Hierarchy, OUs & Account Provisioning 5.2 Service Control Policies (SCPs) & Multi-Account Guardrails 5.3 AWS Control Tower, Account Factory & Landing Zone Automation
6 Chapter 6: Systems Manager & Large-Scale Fleet Configuration
6.1 SSM Agent, Hybrid Activation & Session Manager 6.2 Systems Manager Run Command, State Manager & Associations 6.3 Patch Manager, Parameter Store vs Secrets Manager & AppConfig
7 Chapter 7: High Availability & Multi-Region Resiliency
7.1 Designing Resilient Multi-AZ & Multi-Region Architectures 7.2 Route 53 Traffic Flow, Health Checks & DNS Failover 7.3 Data Replication: Aurora Global DB, DynamoDB Global Tables & S3 CRR
8 Chapter 8: Scalability, Auto Scaling & Disaster Recovery Automation
8.1 EC2 Auto Scaling Policies, Lifecycle Hooks & Warm Pools 8.2 Container & Serverless Scalability: ECS Capacity Providers, EKS & API Gateway 8.3 Disaster Recovery Strategies: RTO, RPO & Architecture Tiers 8.4 Automated Backup & Recovery with AWS Backup & Elastic Disaster Recovery
9 Chapter 9: CloudWatch Metrics, Agent Collection & Log Aggregation
9.1 CloudWatch Metrics, Dimensions, Metric Math & High Resolution 9.2 Unified CloudWatch Agent & Custom Metric Collection 9.3 Centralized Log Aggregation, Retention & Cross-Account Subscriptions
10 Chapter 10: Log Analysis, Dashboards & Distributed Tracing with X-Ray
10.1 CloudWatch Logs Insights, Filter Syntax & Query Optimization 10.2 CloudWatch Dashboards, Composite Alarms & Anomaly Detection 10.3 Distributed Tracing with AWS X-Ray & Service Maps
11 Chapter 11: Automated Observability & Event-Driven Monitoring
11.1 Application & Infrastructure Health Checks with Route 53 & ALB 11.2 Centralized Observability with Amazon OpenSearch & Athena 11.3 Synthetic Monitoring with CloudWatch Synthetics Canaries
12 Chapter 12: Event-Driven Incident Detection & Notification Pipelines
12.1 AWS Health, CloudTrail Events & Operational Notification 12.2 EventBridge Event Routing, Patterns & Multi-Account Buses 12.3 Asynchronous Event Processing: SNS, SQS Queues & Dead-Letter Handling
13 Chapter 13: Automated Remediation & Deployment Troubleshooting
13.1 AWS Config Managed Rules & Automated Remediation with SSM 13.2 Event-Driven Infrastructure Self-Healing with Lambda & Step Functions 13.3 Troubleshooting CI/CD Pipeline & Deployment Failures 13.4 Root Cause Analysis for Auto Scaling & Container Failures
14 Chapter 14: Identity, Access Management & Secrets at Scale
14.1 IAM Policy Evaluation Logic, NotAction & Explicit Denies 14.2 IAM Permissions Boundaries & Delegated Administration 14.3 IAM Identity Center, Cross-Account Roles & STS Session Policies 14.4 Automated Secrets Management & Secret Rotation with Secrets Manager
15 Chapter 15: Security Automation, Data Protection & Compliance Auditing
15.1 Network Security Automation: Security Groups, NACLs, Network Firewall & WAF 15.2 Cryptographic Controls & Key Management with AWS KMS & ACM 15.3 Automated Threat Detection: GuardDuty, Inspector & Security Hub 15.4 Continuous Compliance Auditing & Log Integrity with CloudTrail & Config
14.3 IAM Identity Center, Cross-Account Roles & STS Session Policies
Key Takeaways Explain This Topic AI
AWS IAM Identity Center centralizes workforce authentication across AWS Organizations, integrating external IdPs (Okta, Microsoft Entra ID) via SAML 2.0 for single sign-on and SCIM for automated user and group lifecycle provisioning.
Permission Sets define access entitlements in IAM Identity Center, which automatically provisions corresponding IAM roles (AWSReservedSSO_*) and trust policies across assigned member accounts.
Cross-account role assumption via AWS STS AssumeRole requires reciprocal trust: the target role trust policy must trust the calling principal, and the calling identity must have an identity policy allowing sts:AssumeRole.
The sts:ExternalId condition key is essential when delegating cross-account role access to third-party multi-tenant SaaS providers to prevent the Confused Deputy vulnerability.
STS Session Policies passed during AssumeRole dynamically restrict temporary credentials to a strict subset of the role's identity policies, enabling ephemeral, least-privilege CI/CD deployment scopes.
Last updated: September 2026
Enterprise Workforce Identity: AWS IAM Identity Center
In modern multi-account enterprise architectures, managing static IAM users with long-term access keys inside individual member accounts is a critical anti-pattern. AWS IAM Identity Center (successor to AWS Single Sign-On) serves as the centralized identity hub, managing workforce access across all AWS accounts in an AWS Organization and third-party SaaS cloud applications.
Identity Provider (IdP) Federation: SAML 2.0 & SCIM
IAM Identity Center integrates natively with enterprise identity providers such as Okta , Microsoft Entra ID (formerly Azure AD) , PingFederate , and CyberArk using two standardized protocols:
SAML 2.0 (Security Assertion Markup Language) : Handles authentication . When a user signs into the AWS access portal, IAM Identity Center redirects the authentication request to the external IdP. Upon successful authentication (including enterprise MFA, device trust, and conditional access policies), the IdP issues a cryptographically signed SAML assertion back to Identity Center.
SCIM (System for Cross-domain Identity Management) : Handles automated provisioning and lifecycle synchronization . The IdP periodically pushes user accounts, user attributes, group memberships, and account deactivations into IAM Identity Center via REST APIs. When an employee departs and is disabled in Okta or Entra ID, SCIM synchronizes the deactivation to IAM Identity Center. After propagation, the user cannot start new access, but SCIM does not revoke IAM role credentials that were already issued; session duration and explicit session-revocation procedures bound that residual access. ┌────────────────────────┐ ┌───────────────────────────┐
- │ Enterprise IdP (Okta / │ ─── SCIM Push ───>│ AWS IAM Identity Center │
- │ Microsoft Entra ID) │ (Sync Users/Groups)│ (Central Org Account) │
- └───────────┬────────────┘ └─────────────┬─────────────┘
- │ │
- │ SAML 2.0 Authentication │ Deploys Roles
- ▼ ▼
- ┌────────────────────────┐ ┌───────────────────────────┐
- │ Workforce Engineer │ ─── AssumeRole ──>│ Member Accounts A, B, C │
- │ (Web Console / AWS CLI)│ │ AWSReservedSSO_<Set>_<id> │
- └────────────────────────┘ └───────────────────────────┘
- Permission Sets Architecture & Member Account Roles
A Permission Set is a collection of administrator-defined IAM policies that define the level of access users and groups have within targeted AWS accounts. When an administrator assigns a Permission Set and an identity group to an account:
Automated IAM Role Provisioning : IAM Identity Center automatically deploys an IAM service-linked role named AWSReservedSSO_<PermissionSetName>_<random-hash> inside the target member account.
Managed Trust Policy : The provisioned role contains a trust policy allowing federation from the IAM Identity Center instance.
Policy Composition : A Permission Set can incorporate:
Predefined AWS Managed Policies (e.g., AdministratorAccess , ViewOnlyAccess ).
Customer Managed Policies that exist in the target member account.
Inline Policies defined directly within the Permission Set in Identity Center.
Permissions Boundaries to constrain the maximum permissions granted by the set.
Session Duration : Configurable from 15 minutes up to 12 hours (default: 1 hour).
Cross-Account Role Assumption with AWS STS
For machine-to-machine interactions, automated CI/CD deployment pipelines, and operational cross-account governance, AWS Security Token Service (STS) provides temporary, rotating security credentials through the AssumeRole API.
The Two-Way Reciprocal Trust Model
Cross-account role assumption requires explicit reciprocal configuration across both accounts:
Target Account (Account B - Trusting Account) :
The target role must have a Trust Policy (resource-based policy) that explicitly allows the principal in Account A to assume it: {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "TrustAccountAPrincipal",
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam::111111111111:role/CICDPipelineRole"
- },
- "Action": "sts:AssumeRole"
- }
- ]
- }
Calling Account (Account A - Trusted Account) :
The calling entity ( CICDPipelineRole ) must possess an Identity Policy allowing it to call sts:AssumeRole targeting Account B's role ARN: {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "AllowAssumeRoleInAccountB",
- "Effect": "Allow",
- "Action": "sts:AssumeRole",
- "Resource": "arn:aws:iam::222222222222:role/ProductionDeploymentRole"
- }
- ]
- }
When sts:AssumeRole is invoked, STS returns temporary credentials consisting of an AccessKeyId , SecretAccessKey , SessionToken , and Expiration (valid from 15 minutes up to 12 hours depending on the role's maximum session duration).
Preventing Confused Deputy Attacks with sts:ExternalId
The Confused Deputy problem is a classic cross-account security vulnerability that arises when a customer grants a third-party multi-tenant SaaS provider (e.g., a SaaS monitoring, security scanning, or cost optimization tool) permission to assume an IAM role in the customer's account.
The Vulnerability Flow
Company X signs up with SaaS Vendor V. Vendor V tells Company X: "Create an IAM role trusting our AWS account (999999999999) so our scanner can analyze your environment."
Attacker A also signs up with SaaS Vendor V. Attacker A configures their scanner settings, but enters Company X's IAM Role ARN instead of their own.
Vendor V's backend assumes Company X's IAM role using its legitimate credentials. Because Company X's trust policy simply trusted Vendor V's account ARN, the request succeeds.
Attacker A receives all of Company X's sensitive infrastructure and operational data from Vendor V's console! Vendor V acted as a confused deputy .
The Architectural Solution: sts:ExternalId
To eliminate this vulnerability, the SaaS vendor must generate a unique, secret, cryptographically random identifier (External ID) for each customer tenant.
When Company X configures their role trust policy, they mandate that the caller must supply this unique External ID using the sts:ExternalId condition key: {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam::999999999999:root"
- },
- "Action": "sts:AssumeRole",
- "Condition": {
- "StringEquals": {
- "sts:ExternalId": "x-tenant-uuid-9876-5432-10fe-cba987654321"
- }
- }
- }
- ]
- }
When Vendor V assumes the role on behalf of Company X, its backend includes the parameter --external-id x-tenant-uuid-... . If Attacker A attempts to pass Company X's role ARN, Vendor V will pass Attacker A's External ID, the condition evaluation fails, and STS immediately rejects the request.
Dynamic Ephemeral Scoping: STS Session Policies
In modern automated CI/CD pipelines, creating and maintaining distinct static IAM roles for hundreds of individual microservices and deployment stages creates severe administrative overhead and quickly approaches IAM service quotas.
STS Session Policies enable a powerful architectural pattern: Ephemeral Least-Privilege Scoping . An advanced session policy is an inline policy (or managed policy ARNs) passed as a parameter during the sts:AssumeRole API call: aws sts assume-role \
- -role-arn arn:aws:iam::222222222222:role/GenericDeploymentRole \
- -role-session-name DeployOrdersServiceJob \
- -policy '{
- "Version": "2012-10-17",
- "Statement": [{
- "Effect": "Allow",
- "Action": ["ecs:UpdateService", "s3:*"],
- "Resource": [
- "arn:aws:ecs:us-east-1:222222222222:service/prod-cluster/orders-service",
- "arn:aws:s3:::prod-orders-assets/*"
- ]
- }]
- }'
- Evaluation Mechanics of Session Policies
The session policy does not grant any permissions independently.
The temporary session's effective permissions are strictly the intersection of the role's identity policy and the dynamic session policy.
A centralized CI/CD server in a Shared Services account can assume a single cross-account DeploymentRole across 50 target accounts, dynamically passing a session policy that restricts the resulting credentials strictly to the specific microservice, bucket, or cluster targeted by that individual pipeline execution.
STS Regional Endpoints vs. Global Endpoint & VPC PrivateLink
Endpoint Type Network Route & Target Latency & Resilience Token Scope
Global (legacy) endpoint ( sts.amazonaws.com ) In enabled-by-default Regions, requests resolved by Amazon DNS are served in the originating Region; opt-in Regions or other DNS resolvers can still route to us-east-1 Routing behavior depends on Region and DNS resolution, so it is less explicit Legacy token behavior can depend on account and Region settings
Regional endpoints ( sts.<region>.amazonaws.com ) Explicitly targets the selected Region and supports an interface VPC endpoint Removes an unintended cross-Region dependency; AWS recommends Regional endpoints Temporary credentials from Regional endpoints are valid globally
VPC Interface Endpoint ( com.amazonaws.<region>.sts ) AWS PrivateLink (Elastic Network Interface in private VPC subnet) Zero internet traversal; traffic remains entirely within AWS private network backbone Eliminates NAT Gateway egress fees and enforces compliance