This lesson combines 3 topics: AWS Organizations, Multi-Account Patterns, IAM Identity Center (AWS SSO).
Learning Objectives
- Understand how AWS Organizations works
- Master the OU structure and account hierarchy
- Know how to use Service Control Policies (SCPs)
- Understand common multi-account patterns
- Master how to design an account structure
- Know cross-account access patterns
- Understand how IAM Identity Center works
- Master Permission Sets and Account Assignments
- Know how to integrate with external identity providers
Part 1: AWS Organizations
1. AWS Organizations Overview
Definition
AWS Organizations lets you centrally manage multiple AWS accounts, including:
- Consolidated billing
- Hierarchical grouping (OUs)
- Policy-based management
- Automated account provisioning
Basic structure
2. Organizational Units (OUs)
Best Practice OU Structure
OU Design Principles
- Flat structure: Avoid too many levels (max 5)
- Purpose-based: Group by purpose
- Policy inheritance: SCPs inherit from the parent
- Separation of duties: Separate responsibilities
3. Service Control Policies (SCPs)
How it works
SCP Inheritance
SCP Strategies
Strategy 1: Deny List (Recommended)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyLeaveOrg",
"Effect": "Deny",
"Action": "organizations:LeaveOrganization",
"Resource": "*"
},
{
"Sid": "DenyRootUser",
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringLike": {
"aws:PrincipalArn": "arn:aws:iam::*:root"
}
}
}
]
}
Strategy 2: Allow List
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:*",
"s3:*",
"rds:*"
],
"Resource": "*"
}
]
}
Common SCP Use Cases
| Use Case | SCP Action |
|---|---|
| Prevent leaving organization | Deny organizations:LeaveOrganization |
| Restrict regions | Deny all actions in non-approved regions |
| Prevent root user usage | Deny * with root principal |
| Require encryption | Deny if encryption disabled |
| Prevent public S3 | Deny s3:PutBucketPublicAccessBlock |
Example: Region Restriction SCP
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyNonApprovedRegions",
"Effect": "Deny",
"NotAction": [
"cloudfront:*",
"iam:*",
"route53:*",
"support:*"
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"ap-southeast-1",
"us-east-1"
]
}
}
}
]
}
Resource Control Policies (RCPs) — launched 11/2024
An SCP answers the question "what can principals in the org do?". An RCP answers the opposite question: "who can resources in the org grant access to?". RCPs are the main tool for building a data perimeter at org scale — for example, preventing any S3 bucket in any member account from being shared with principals outside the org, no matter which team wrote the bucket policy.
| SCP | RCP | |
|---|---|---|
| Boundary for | Principals (IAM users/roles) in member accounts | Resources (buckets, keys, queues...) in member accounts |
| Affects principals outside the org | No | Yes — applies when a principal outside the org calls a resource in the org |
| Grants permissions? | No | No |
| Default | FullAWSAccess | RCPFullAWSAccess |
| Affects Management Account | No | No |
| Limits | 10 SCPs/entity, 10,240 characters (raised from 5 / 5,120 in 05/2026) | 5 RCPs/entity, 5,120 characters (RCPFullAWSAccess counts toward the quota and cannot be detached) |
| Supported services | All | A limited, gradually expanding list: S3, STS, KMS, SQS, Secrets Manager (at launch), with more services added later |
The classic RCP pattern — only principals in the org (or AWS services) can access resources:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EnforceOrgIdentities",
"Effect": "Deny",
"Principal": "*",
"Action": ["s3:*", "sqs:*", "kms:*", "secretsmanager:*", "sts:AssumeRole"],
"Resource": "*",
"Condition": {
"StringNotEqualsIfExists": {
"aws:PrincipalOrgID": "o-xxxxxxxxxx"
},
"BoolIfExists": {
"aws:PrincipalIsAWSService": "false"
}
}
}
]
}
Common exam points:
- "Prevent resources from being shared with identities outside the organization" → RCP (not SCP, because SCPs don't apply to principals outside the org).
- "Prevent identities in the organization from accessing resources outside the organization" → SCP with
aws:ResourceOrgID. - RCP + SCP + VPC endpoint policy = the three sides of the data perimeter (identity, resource, network).
- An RCP has
Principalin its statements (like a resource policy); an SCP does not. - RCPs you create can only use
Effect: Deny;Allowexists only in the defaultRCPFullAWSAccess. Actions must be service-specific (s3:*,kms:*...); you can't use"*"for everything. - RCPs don't apply to service-linked roles and AWS managed KMS keys — if a question asks "why does the service-linked role still work", this is the reason.
Declarative Policies — launched 12/2024
A declarative policy declares the default configuration of a service for the whole org/OU, and the service enforces it at the API layer, with no need to write complex IAM/SCP denies. It currently supports EC2 and related services:
| Attribute | Meaning |
|---|---|
ec2_attributes.allowed_images_settings | Only allow launches from AMIs of permitted accounts/partners (Allowed AMIs) |
ec2_attributes.image_block_public_access | Block public AMIs |
ec2_attributes.snapshot_block_public_access | Block public EBS snapshots |
ec2_attributes.instance_metadata_defaults | IMDSv2 required by default |
ec2_attributes.serial_console_access | Disable the serial console |
ec2_attributes.vpc_block_public_access | Block internet gateway ingress/egress for the whole VPC |
Difference from SCPs: an SCP blocks an API call, while a declarative policy sets a configuration state and provides an account status report to see which accounts are not yet compliant. Exam keyword: "enforce IMDSv2 / block public AMI across all accounts with least operational overhead" → declarative policy.
4. Consolidated Billing
How it works
Benefits
- Volume discounts: Usage aggregated across accounts
- Reserved Instance sharing: RIs apply across organization
- Savings Plans sharing: SPs apply across organization
- Single payment method: One bill, one payment
5. Organization Features
All Features vs Consolidated Billing Only
| Feature | All Features | Billing Only |
|---|---|---|
| Consolidated billing | ✓ | ✓ |
| SCPs | ✓ | ✗ |
| Resource control policies (RCPs) | ✓ | ✗ |
| Declarative policies | ✓ | ✗ |
| Tag policies | ✓ | ✗ |
| Backup policies | ✓ | ✗ |
| AI services opt-out | ✓ | ✗ |
| Service access | ✓ | ✗ |
Delegated Administrator
6. AWS Control Tower
Relationship with Organizations
7. CloudTrail Organizational Trail
Concept
An organizational trail is a CloudTrail trail created from the management account (or from the delegated administrator for CloudTrail) that automatically applies to EVERY member account in the Organization — including accounts created/joined later.
Key characteristics (frequently tested)
- Create once, cover the whole org: no need to go into each account and create a separate trail — reduces operational overhead.
- Member accounts CANNOT interfere: a member account sees the organizational trail (read-only) in its console/API but cannot disable (StopLogging), modify, or delete it. This is the anti-tampering mechanism — even the member account's admin cannot turn off the audit log.
- Logs centralized in one place: all events from every account are written to a single S3 bucket in a central account, partitioned by the prefix
AWSLogs/<org-id>/<account-id>/.... - New accounts are covered automatically: when a new account joins the org → the trail applies immediately, with no extra steps.
Centralized logging architecture
Bucket policy for the central S3 bucket
The S3 bucket in the central account must have a bucket policy that allows the service principal cloudtrail.amazonaws.com to write logs, scoped to the org trail's ARN via aws:SourceArn (confused deputy protection):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AWSCloudTrailWrite",
"Effect": "Allow",
"Principal": {"Service": "cloudtrail.amazonaws.com"},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::central-audit-logs/AWSLogs/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control",
"aws:SourceArn": "arn:aws:cloudtrail:ap-southeast-1:111111111111:trail/org-trail"
}
}
}
]
}
Best practice
- Log to an S3 bucket in a separate Log Archive account (not the management account) — separating log access from org administration rights. AWS Control Tower does exactly this when setting up the landing zone: it automatically creates an organizational trail that writes to the Log Archive account.
- Enable log file validation + S3 Object Lock/versioning to strengthen the immutability of the audit trail.
- Delegate CloudTrail administration to the security account (delegated administrator) to reduce use of the management account.
Exam keyword: "centralize audit logs across all accounts in the organization" + "prevent member accounts from tampering/disabling logging" → CloudTrail organizational trail (not a per-account trail + a manual SCP).
8. aws:PrincipalOrgID in Resource Policies
The problem
You want all accounts in the Organization to access a resource (S3 bucket, SQS queue, SNS topic, KMS key, Secrets Manager secret, Lambda, VPC endpoint policy...) — listing every account ID in the resource policy bloats the policy, and you have to update it every time an account is added or removed.
Solution: the aws:PrincipalOrgID condition key
A global condition key that compares the Organization ID of the calling principal with a specified value. With a single condition, every principal (IAM user/role) in any account in the org matches — accounts that join the org get access automatically, and accounts that leave lose it automatically.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowOrgWideAccess",
"Effect": "Allow",
"Principal": "*",
"Action": ["s3:GetObject", "s3:ListBucket"],
"Resource": [
"arn:aws:s3:::shared-artifacts",
"arn:aws:s3:::shared-artifacts/*"
],
"Condition": {
"StringEquals": {
"aws:PrincipalOrgID": "o-a1b2c3d4e5"
}
}
}
]
}
Note: "Principal": "*" combined with the aws:PrincipalOrgID condition is not public — only authenticated principals belonging to the org satisfy the condition (anonymous access has no org ID, so it is excluded).
aws:PrincipalOrgPaths — scoping by OU
When you only want to allow accounts in a specific OU (not the whole org), use aws:PrincipalOrgPaths with the OU path:
{
"Condition": {
"ForAnyValue:StringLike": {
"aws:PrincipalOrgPaths": "o-a1b2c3d4e5/r-ab12/ou-ab12-11111111/*"
}
}
}
- The path has the form
<org-id>/<root-id>/<ou-id>/...; a trailing*wildcard also covers the sub-OUs below. - It is a multivalued key → you must use the set operator
ForAnyValue/ForAllValues.
Quick comparison
| Condition key | Scope | Use case |
|---|---|---|
aws:PrincipalOrgID | The entire organization | Share a resource with every account in the org |
aws:PrincipalOrgPaths | A specific OU (and its sub-OUs) | Only the Production OU has access |
aws:PrincipalAccount | One account | Grant to a single account |
Exam keyword: "grant access to all accounts in the organization" / "without listing/maintaining individual account IDs" → resource policy with
aws:PrincipalOrgID. If the question restricts to "only accounts in the Production OU" →aws:PrincipalOrgPaths.
Part 2: Multi-Account Patterns
1. Why Multi-Account?
Single Account Problems
Benefits of Multi-Account
2. Common Account Patterns
Pattern 1: Environment-based
Pattern 2: Team-based
Pattern 3: Application-based
3. AWS Landing Zone Pattern
Recommended Structure
4. Cross-Account Access
Method 1: IAM Roles (Recommended)
Trust Policy (Account B):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111111111111:root"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "unique-external-id"
}
}
}
]
}
Method 2: Resource-based Policies
Bucket Policy (Account B):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111111111111:user/username"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucket-name/*"
}
]
}
When to use which?
| Scenario | Method |
|---|---|
| Access multiple resources | IAM Role |
| Temporary access | IAM Role |
| Single resource access | Resource Policy |
| S3, SQS, SNS, KMS | Either |
| Audit requirements | IAM Role (better audit) |
5. Centralized Services Pattern
Centralized Logging
Centralized Security
Centralized Network
6. Account Vending
AWS Service Catalog
AWS Control Tower Account Factory
Part 3: IAM Identity Center (AWS SSO)
1. IAM Identity Center Overview
Definition
IAM Identity Center (formerly AWS SSO) provides:
- Single sign-on for multiple AWS accounts
- Centralized access management
- Integration with external IdPs
- Temporary credentials (no long-term keys)
Architecture
2. Identity Sources
Option 1: Built-in Identity Store
Pros:
- Simplest setup
- No additional cost
- Built-in MFA
Cons:
- Separate user management
- No sync with corporate directory
Use case: Small organizations without existing IdP
Option 2: AWS Managed Microsoft AD
Option 3: External Identity Provider (SAML 2.0)
Comparison
| Feature | Built-in | Managed AD | External IdP |
|---|---|---|---|
| Setup complexity | Low | Medium | Medium |
| User management | Manual | AD tools | IdP tools |
| Corporate sync | No | Yes (trust) | Yes (SCIM) |
| MFA | Built-in | AD MFA | IdP MFA |
| Cost | Free | AD cost | IdP cost |
3. Permission Sets
Definition
Permission Sets are collections of policies that define access permissions to AWS accounts.
Types
1. AWS Managed Policies
- AdministratorAccess
- ViewOnlyAccess
- Billing
- PowerUserAccess
2. Customer Managed Policies
- Custom policies you create
3. Inline Policies
- Policies attached directly to the permission set
Permission Set Structure
{
"PermissionSet": {
"Name": "DatabaseAdmin",
"Description": "Full access to RDS and DynamoDB",
"SessionDuration": "PT4H",
"ManagedPolicies": [
"arn:aws:iam::aws:policy/AmazonRDSFullAccess",
"arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess"
],
"InlinePolicy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "rds:DeleteDBInstance",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:ResourceTag/Environment": "dev"
}
}
}
]
},
"PermissionsBoundary": {
"ManagedPolicyArn": "arn:aws:iam::aws:policy/boundary-policy"
}
}
}
Permission Set Best Practices
- Least privilege: Grant only the permissions needed
- Separation of duties: Separate responsibilities
- Use managed policies: Easy to maintain
- Permission boundaries: Cap the maximum permissions
- Session duration: Set appropriate timeout
4. Account Assignments
How it works
Assignment Matrix Example
5. Temporary Credentials Flow
User Login Flow
CLI Access
# Configure SSO
aws configure sso
# → Enter SSO start URL
# → Enter SSO Region
# → Browser opens for authentication
# → Select account and role
# Use profile
aws s3 ls --profile my-sso-profile
# Or set default
export AWS_PROFILE=my-sso-profile
aws s3 ls
6. ABAC with IAM Identity Center
Attribute-Based Access Control
7. Multi-Account Permissions
Delegated Administration
8. Integration Patterns
Pattern 1: Okta Integration
Pattern 2: Azure AD Integration
Review Questions
-
Is the Management Account affected by SCPs?
Show answer
No — SCPs do not apply to the management account, not even the SCP at the root OU. Best practice: don't deploy workloads in the management account. Use the management account only for organization management, billing, and Control Tower. All workloads should live in member accounts — subject to SCP governance.
-
How does SCP inheritance work?
Show answer
SCPs apply hierarchically: Root → OU → Sub-OU → Account. An account must have an SCP allow at every parent level for an action to be permitted. Example: a Root SCP denies us-west-2 → no account, including those in child OUs, can use us-west-2. An OU SCP restricts further within what the Root SCP already allows. You cannot use an OU SCP to "unblock" what the Root SCP has blocked.
-
Deny List vs Allow List SCP strategy: which one is recommended?
Show answer
AWS recommends the Deny List (allow all by default, explicitly deny specific things). Reason: easier to start — all permissions are available by default, and you only add a Deny when you need to restrict (for example: deny region access, deny specific services). An Allow List (deny all by default, explicitly allow everything needed) is more complex, risks blocking unexpected services, and has high maintenance overhead. Deny Lists are more common in production Organizations.
-
Can Reserved Instances be shared across the organization?
Show answer
Yes — with consolidated billing, the RIs and Savings Plans of one account in the Organization automatically apply (as a discount) to other accounts if those accounts have matching usage and the RI isn't fully used. You can disable sharing per account if you want (RI credit sharing settings in Billing). This is why consolidated billing saves money: unused RIs aren't "wasted" but benefit the entire org.
-
What is a Delegated Administrator used for?
Show answer
It lets a member account manage an AWS service for the entire Organization (instead of doing it from the management account). Examples: delegate GuardDuty admin to the Security account, delegate Config admin to the Audit account, delegate IAM Identity Center admin to a dedicated SSO account. It reduces the need to access the management account and separates concerns — the security team manages from its own security account.
-
A company needs to centralize CloudTrail logs from 50 accounts and ensure that member account admins cannot disable logging. Which solution has the least operational overhead?
Show answer
A CloudTrail organizational trail created from the management account (or delegated administrator), logging to an S3 bucket in the Log Archive account. The trail automatically applies to every member account (including newly joined accounts); member accounts see the trail but cannot StopLogging/modify/delete it. Compared with creating a trail in each account + an SCP denying
cloudtrail:StopLogging: the organizational trail has less overhead (a single trail, no need to maintain 50 trails + an SCP), and tamper protection is built in rather than depending on a correctly written SCP. -
How do you allow all accounts in the Organization to read an S3 bucket without listing every account ID?
Show answer
Use a bucket policy with the
aws:PrincipalOrgIDcondition:"Condition": {"StringEquals": {"aws:PrincipalOrgID": "o-xxxx"}}together with"Principal": "*". Only authenticated principals belonging to the org satisfy the condition (it's not public); accounts that join the org get access automatically, and accounts that leave lose it automatically — no need to maintain a list of account IDs. If you only want to restrict to a specific OU → useaws:PrincipalOrgPaths(a multivalued key, requiresForAnyValue:StringLike) with the patho-xxxx/r-xxxx/ou-xxxx/*. -
What are the 3 common multi-account patterns?
Show answer
(1) Environment separation: Prod, Dev, Test, Staging in separate accounts — blast radius isolation, different IAM policies per environment. (2) Workload/team separation: each team or product in its own account — ownership clarity, independent billing, IAM isolation. (3) Security/Shared services: dedicated accounts for Log Archive, Security/Audit, Network Hub, Shared Services (CI/CD, monitoring). All 3 patterns are usually combined.
-
What does cross-account access via an IAM Role require on both sides?
Show answer
Account A (owns the role being assumed): the role's trust policy allows a principal from Account B to assume the role (
sts:AssumeRole). Account B (wants to assume the role): the identity has an IAM policy withsts:AssumeRolepermission on Account A's role ARN. Both conditions must be satisfied — they cannot be bypassed. Optionally: an External ID in the trust policy for additional security with 3rd-party vendors. -
What should the Log Archive Account contain?
Show answer
All audit/compliance logs: CloudTrail (the Organization Trail records logs from every account), CloudWatch Logs (centralized), Config snapshots, S3 Access Logs, ALB Access Logs. Policies: an S3 bucket policy that only allows appends (no delete), Vault Lock on AWS Backup, MFA delete on the S3 bucket. Access: only the Security/Compliance team has read access. Member accounts have write only, no delete.
- Which services does the Network Account usually manage?
Show answer
Transit Gateway (hub routing between VPCs and on-premises), Direct Connect connections, AWS Network Firewall, Route 53 Resolver (central DNS), VPC Sharing (sharing subnets from a centralized VPC to member accounts), NAT Gateways (centralized egress). Centralized networking reduces cost (no need for a separate DX per account) and increases visibility and control over traffic flow.
- How does an account vending machine work?
Show answer
Account Factory (in Control Tower) automatically creates accounts with: pre-configured controls (formerly: guardrails), SSO access, a baseline VPC, and logging setup. Process: the team fills in a form → Account Factory triggers Service Catalog → creates a new AWS account → applies SCPs, baselines, SSO configuration → notifies the requester. The account is ready to use in minutes instead of the days a manual process takes. Customizable with Account Factory Customization (hooks).
- What are the Identity Source options?
Show answer
3 options: (1) IAM Identity Center directory (built-in, create/manage users in Identity Center), (2) Active Directory (AWS Managed Microsoft AD or AD Connector for on-premises AD), (3) External IdP (Okta, Azure AD, OneLogin, Google Workspace) via SAML 2.0. You can only choose 1 identity source at a time. Changing the identity source requires reassigning account assignments.
- What is a Permission Set and what does it contain?
Show answer
A Permission Set is a template that defines the permissions assigned to a user/group when they access an account. It contains: AWS managed policies (e.g. ReadOnlyAccess, AdministratorAccess), Customer managed policies, an Inline policy, and a Permission Boundary. When a user accesses an account through the IAM Identity Center portal, the Permission Set creates a temporary IAM Role in that account with the defined permissions.
- How does an Account Assignment work?
Show answer
An Account Assignment is a mapping: User/Group → Permission Set → AWS Account. Example: the group "Developers" has the Permission Set "DevAccess" assigned to the account "Dev-123". When a Developer logs in to the Identity Center portal, they see Dev-123 in their account list and can assume the DevAccess role. IAM Identity Center automatically creates and maintains IAM Roles in the target accounts based on the assignments.
- What is ABAC with IAM Identity Center?
Show answer
Attribute-Based Access Control — uses user attributes (from the Identity Source: department, title, team) as tags to control access. Example: a user with the attribute Department=Finance is assigned to accounts tagged Department=Finance. Less need to manage individual assignments — add a user to the right group with the right attribute → access is granted automatically. Especially powerful when the user directory syncs with AD/Okta (attributes populate automatically).
- What is a Delegated Administrator used for?
Show answer
It lets you delegate administration of IAM Identity Center from the management account to a member account (usually a Security/Identity account). Administrators in that member account can manage users, groups, permission sets, and account assignments for the entire Organization — without accessing the management account. Best practice for separation of duties: minimal management account credentials, with the Identity admin team working from a dedicated account.
Hands-on Exercises
Part 1: AWS Organizations
- Create an AWS Organization with 2 OUs
- Create an SCP that denies a specific region
- Setup consolidated billing view
- Explore Control Tower landing zone
Part 2: Multi-Account Patterns
- Design a multi-account structure for a fictitious company
- Setup cross-account role
- Configure centralized CloudTrail
- Explore Control Tower Account Factory
Part 3: IAM Identity Center (AWS SSO)
- Enable IAM Identity Center
- Create permission sets
- Create a user and assign to accounts
- Test CLI access with SSO
References
- AWS Organizations User Guide
- Service Control Policies
- Resource Control Policies
- Declarative Policies
- AWS Organizations FAQ
- Creating a trail for an organization (CloudTrail)
- AWS global condition context keys (aws:PrincipalOrgID, aws:PrincipalOrgPaths)
- AWS Multi-Account Strategy
- AWS Control Tower (replaces the deprecated AWS Landing Zone solution)
- Best Practices for AWS Organizations
- IAM Identity Center User Guide
- Permission Sets
- Multi-Account Permissions