AWS Organizations and SCPs
-
Phase 0: Before you start
-
Phase 1: The foundation
-
Phase 2: Operations and security
-
Phase 3: SQL Server on AWS
-
Phase 4: Troubleshooting step by step
-
Phase 5: Final project and career
IAM decides what a user can do inside one account, while service control policies (SCPs) decide what anyone can do across a whole group of accounts, and that includes account administrators and even the root user. When a company says “nothing outside Mumbai” or “nobody turns off CloudTrail” and means it, an SCP is usually what makes the rule stick.
Your lab account becomes the management account of a new organization. You’ll create a sandbox member account, lock it to Mumbai with an SCP and set up IAM Identity Center sign-in for it, which we promised back in Lesson 6. After that you’ll break IAM with a careless SCP, lock the sandbox out completely, and fix both problems.
| Time | You need | By the end you can |
|---|---|---|
| 90 minutes | You need your laptop signed in as saat-admin, a browser, and an email address that can receive mail for a second account (a plus address such as you+saat-sandbox@gmail.com works with Gmail and Outlook). Organizations, SCPs and IAM Identity Center cost nothing, but please read the warning at the start of the lab before you begin. | Create an organization, an OU and a member account, write and attach SCPs and see how they combine with IAM, then enable IAM Identity Center with a permission set and troubleshoot SCP denials. |
What it is, in one line
Service control policies are AWS Organizations policies that set the maximum permissions for every user and role in member accounts; they never grant access by themselves.
In Simple Words
School rules and class rules
In a school, each class teacher sets rules for their own class, like who sits where and who gets to use the computer. That’s IAM inside one account.
On top of that, the school has rules for every class, such as nobody leaving the campus during school hours and no phones in exams, and no class teacher can override them however much they’d like to. Those are SCPs. The principal’s own office isn’t covered by the school rules, though, which is why a principal has to be careful, and that office is the management account, because SCPs never apply to it.
Engineer's View
How Organizations and SCPs work
An organization has one management account (the account that created it and pays the bill) and a set of member accounts grouped into organizational units (OUs) under a root. Once all features are enabled you can use policies such as SCPs, resource control policies (RCPs), tag policies, backup policies and a few others.
An SCP is written in IAM policy syntax, but all it does is filter. A request in a member account goes through only if every SCP from the root down to the account allows it (no explicit Deny, plus an Allow at each level, which FullAWSAccess gives you by default) and the account’s own IAM policies allow it too. SCPs cover every principal in member accounts, their root users included, but they don’t touch service-linked roles or the management account.
Global services like IAM, STS (global endpoint), Route 53, CloudFront and Organizations are served from us-east-1, so any SCP that restricts Regions has to exempt them with NotAction. IAM Identity Center uses the organization to give people single sign-on into any member account through permission sets, and each permission set turns into a role named AWSReservedSSO_... in the account.
How it works, step by step
This is where each piece ends up once you finish the lab.
1Your account becomes the management account
Creating the organization doesn’t change any resources in your account, but from that point your account owns the organization and pays for every member account in it.
2A member account joins an OU
The organization creates saat-sandbox and puts it in the Sandbox OU, and you get into it by assuming OrganizationAccountAccessRole from the management account.
3SCPs filter everything in that OU
With deny-outside-mumbai on the Sandbox OU, not even the sandbox account’s own administrator can create anything in us-east-1.
4People sign in through Identity Center
Rather than IAM users in every account, each person gets one sign-in and a permission set for each account they need. Most SCP surprises come down to these facts:
In real companies the management account holds almost nothing, with no workloads and very few people. Security, logging and workloads sit in member accounts, where SCPs can protect them.
✅ Checkpoint: You can explain management versus member accounts, why SCPs never grant anything, how they combine with IAM and why Region SCPs need NotAction.
Hands-on lab: an organization with service control policies
Before you run any command, double-check it
Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.
Before you start: read this
Under AWS’s Free Tier terms, an account that enrolls in AWS Organizations can no longer use or earn Free Tier credits. If you still have credits you’d like to keep, read through this lesson without running steps 1 to 4 for now and come back once the credits are used up or close to expiring. If you moved to the Paid plan in Lesson 2 and don’t mind giving up credits, go ahead.
The sandbox is a real AWS account. Keeping it for later lessons costs nothing, and when you finish the course you can close it with aws organizations close-account. A closed account stays suspended for 90 days before it’s removed.
Sign in and set the sandbox email address:
cd C:\aws-lab
aws login --profile saat-admin
$env:AWS_PROFILE = 'saat-admin'
$sandboxEmail = 'you+saat-sandbox@gmail.com'
$ssoUser = 'yourname'1Create the organization and a Sandbox OU
Paste this whole block:
$org = aws organizations create-organization --feature-set ALL --query Organization.Id --output text
$root = aws organizations list-roots --query "Roots[0].Id" --output text
aws organizations enable-policy-type --root-id $root --policy-type SERVICE_CONTROL_POLICY | Out-Null
$ou = aws organizations create-organizational-unit --parent-id $root --name Sandbox --query OrganizationalUnit.Id --output text
aws organizations list-policies-for-target --target-id $ou --filter SERVICE_CONTROL_POLICY --query "Policies[].Name" --output text
"$org $root $ou"You should see something like this:
FullAWSAccess
o-a1b2c3d4e5 r-ab12 ou-ab12-c3d4e5f6Every new OU and account inherits FullAWSAccess, the “allow everything” SCP, which is why switching SCPs on doesn’t break anything until you add a Deny. AWS will also email you asking to verify the management account’s address, so do that, because some organization features need it.
2Create the sandbox account and reach it
Paste this whole block (account creation takes a few minutes):
$req = aws organizations create-account --email $sandboxEmail --account-name saat-sandbox --query CreateAccountStatus.Id --output text
do { Start-Sleep 15; $st, $member = (aws organizations describe-create-account-status --create-account-request-id $req --query "CreateAccountStatus.[State,AccountId]" --output text) -split '\s+' } until ($st -ne 'IN_PROGRESS')
"$st $member"
aws organizations move-account --account-id $member --source-parent-id $root --destination-parent-id $ou
aws configure set role_arn "arn:aws:iam::$($member):role/OrganizationAccountAccessRole" --profile saat-sandbox
aws configure set source_profile saat-admin --profile saat-sandbox
aws configure set region ap-south-1 --profile saat-sandbox
Start-Sleep 30
aws sts get-caller-identity --profile saat-sandbox --query Arn --output textYou should see something like this:
SUCCEEDED 444455556666
arn:aws:sts::444455556666:assumed-role/OrganizationAccountAccessRole/botocore-session-1760975678The organization created the account with a role that trusts the management account, and that role has AdministratorAccess in the sandbox. This is the reason the management account needs such careful protection.
3Lock the sandbox to Mumbai
Paste this whole block:
@'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyOutsideMumbai",
"Effect": "Deny",
"NotAction": [
"iam:*", "organizations:*", "sts:*", "sso:*", "identitystore:*", "account:*",
"support:*", "budgets:*", "ce:*", "billing:*", "pricing:*", "health:*", "trustedadvisor:*",
"cloudfront:*", "route53:*", "route53domains:*", "globalaccelerator:*", "waf:*",
"s3:GetAccountPublicAccessBlock", "s3:ListAllMyBuckets"
],
"Resource": "*",
"Condition": { "StringNotEquals": { "aws:RequestedRegion": [ "ap-south-1" ] } }
}
]
}
'@ | Set-Content scp-regions.json
@'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ProtectBaseline",
"Effect": "Deny",
"Action": [ "organizations:LeaveOrganization", "cloudtrail:StopLogging", "cloudtrail:DeleteTrail", "guardduty:DeleteDetector" ],
"Resource": "*"
}
]
}
'@ | Set-Content scp-protect.json
$scpRegions = aws organizations create-policy --name deny-outside-mumbai --type SERVICE_CONTROL_POLICY --description "Only ap-south-1, except global services" --content file://scp-regions.json --query Policy.PolicySummary.Id --output text
$scpProtect = aws organizations create-policy --name protect-baseline --type SERVICE_CONTROL_POLICY --description "Keep CloudTrail, GuardDuty and org membership" --content file://scp-protect.json --query Policy.PolicySummary.Id --output text
aws organizations attach-policy --policy-id $scpRegions --target-id $ou
aws organizations attach-policy --policy-id $scpProtect --target-id $ou
Start-Sleep 30
aws ec2 describe-vpcs --region ap-south-1 --profile saat-sandbox --query "length(Vpcs)"
aws ec2 describe-vpcs --region us-east-1 --profile saat-sandbox
aws ec2 describe-vpcs --region us-east-1 --query "length(Vpcs)"You should see something like this:
1
An error occurred (UnauthorizedOperation) when calling the DescribeVpcs operation: You are not authorized to perform this operation. User: arn:aws:sts::444455556666:assumed-role/OrganizationAccountAccessRole/botocore-session-1760975678 is not authorized to perform: ec2:DescribeVpcs with an explicit deny in a service control policy
1Look at the three results together: the sandbox can use Mumbai, the SCP refuses the sandbox’s own administrator role in us-east-1, and your management account (the last line) isn’t affected at all.

4Sign in to the sandbox with IAM Identity Center
You enable the organization instance of Identity Center and create your first user in the console:
- Open IAM Identity Center in ap-south-1, choose Enable and keep the organization instance option.
- Go to Users and choose Add user. Give it the username you set in
$ssoUserand an email you can open, then send the invitation. - Accept the invitation email, set a password and register an MFA device.

Next, paste this whole block to give that user admin access to the sandbox and nothing else:
$inst, $idStore = (aws sso-admin list-instances --query "Instances[0].[InstanceArn,IdentityStoreId]" --output text) -split '\s+'
$userId = aws identitystore get-user-id --identity-store-id $idStore --alternate-identifier "UniqueAttribute={AttributePath=userName,AttributeValue=$ssoUser}" --query UserId --output text
$ps = aws sso-admin create-permission-set --instance-arn $inst --name SandboxAdmin --session-duration PT1H --query PermissionSet.PermissionSetArn --output text
aws sso-admin attach-managed-policy-to-permission-set --instance-arn $inst --permission-set-arn $ps --managed-policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws sso-admin create-account-assignment --instance-arn $inst --target-id $member --target-type AWS_ACCOUNT --permission-set-arn $ps --principal-type USER --principal-id $userId --query AccountAssignmentCreationStatus.Status --output text
"Start URL: https://$idStore.awsapps.com/start"You should see something like this:
IN_PROGRESS
Start URL: https://d-9a8b7c6d5e.awsapps.com/startNow create an SSO profile. When the prompts come up, give the start URL from above and Region ap-south-1, and pick saat-sandbox and SandboxAdmin:
aws configure sso --profile saat-sso-sandbox
aws sts get-caller-identity --profile saat-sso-sandbox --query Arn --output text
aws ec2 describe-vpcs --region us-east-1 --profile saat-sso-sandbox --query "length(Vpcs)"You should see something like this (the last command is refused by the SCP, as before):
arn:aws:sts::444455556666:assumed-role/AWSReservedSSO_SandboxAdmin_1a2b3c4d5e6f7a8b/yourname
An error occurred (UnauthorizedOperation) when calling the DescribeVpcs operation: ... with an explicit deny in a service control policySo now one person has one sign-in with MFA, temporary credentials that last an hour, and an SCP that applies whatever permission set they use, which is how most companies run AWS access. When the session expires, run aws sso login --profile saat-sso-sandbox.
For the rest of the course we keep using saat-admin in your main account, so the earlier lessons still work.
✅ Checkpoint: Your organization has a Sandbox OU holding saat-sandbox, an SCP refuses the sandbox in us-east-1 but not your management account, and you can sign in to the sandbox through Identity Center. Keep it all for the break lab.
Break It, Then Fix It
Here are two SCP mistakes that lock people out of things they need.
1Break it: a Region rule without exemptions
Swap the Region SCP for a simpler version that denies every action outside Mumbai:
(Get-Content scp-regions.json -Raw) -replace '(?s)"NotAction": \[.*?\],', '"Action": "*",' | Set-Content scp-regions-naive.json
aws organizations update-policy --policy-id $scpRegions --content file://scp-regions-naive.json | Out-Null
Start-Sleep 30
aws iam list-roles --profile saat-sandbox --max-items 1You’ll get an error like this:
An error occurred (AccessDenied) when calling the ListRoles operation: User: arn:aws:sts::444455556666:assumed-role/OrganizationAccountAccessRole/botocore-session-1760975678 is not authorized to perform: iam:ListRoles on resource: arn:aws:iam::444455556666:role/ with an explicit deny in a service control policyIAM is a global service and its requests count as us-east-1, so “deny everything outside Mumbai” ends up denying all of IAM, Route 53, billing and support as well. Teams usually find out when somebody can’t create a role for a new app. Fix: put back the version with NotAction exemptions:
aws organizations update-policy --policy-id $scpRegions --content file://scp-regions.json | Out-Null
Start-Sleep 30
aws iam list-roles --profile saat-sandbox --max-items 1 --query "Roles[0].RoleName" --output textYou should see something like this:
AWSReservedSSO_SandboxAdmin_1a2b3c4d5e6f7a8b2Break it: remove FullAWSAccess from the OU
Say someone tidies up the Sandbox OU and detaches the “allow everything” policy:
aws organizations detach-policy --policy-id p-FullAWSAccess --target-id $ou
Start-Sleep 30
aws s3api list-buckets --profile saat-sandboxYou’ll get an error like this:
An error occurred (AccessDenied) when calling the ListBuckets operation: User: arn:aws:sts::444455556666:assumed-role/OrganizationAccountAccessRole/botocore-session-1760975678 is not authorized to perform: s3:ListAllMyBuckets because no service control policy allows the s3:ListAllMyBuckets action
Notice the wording says “no service control policy allows” and not “explicit deny”. SCPs also behave as an allow list, where every level from the root down has to allow an action, and since the OU now has only Deny statements, everything in the sandbox stops, its administrators included.
Fix: attach FullAWSAccess again (or an allow-list SCP you’ve designed on purpose):
aws organizations attach-policy --policy-id p-FullAWSAccess --target-id $ou
Start-Sleep 30
aws s3api list-buckets --profile saat-sandbox --query "length(Buckets)"You should see this:
0Keep the organization, the Sandbox OU, both SCPs, the sandbox account and Identity Center, since none of them cost anything and later lessons can use them. You only need to tidy the local files:
Remove-Item scp-regions-naive.json
aws organizations list-policies-for-target --target-id $ou --filter SERVICE_CONTROL_POLICY --query "Policies[].Name" --output textYou should see something like this:
FullAWSAccess deny-outside-mumbai protect-baseline✅ Checkpoint: You fixed a Region SCP that blocked IAM by adding NotAction exemptions, and an OU that was locked out because FullAWSAccess was missing. The Sandbox OU now has FullAWSAccess, deny-outside-mumbai and protect-baseline.
This happened at work
The SCP that stopped every deployment
On a Tuesday afternoon, a retail group added a Region-restriction SCP to its production OU that someone had copied from a blog post. It denied * outside two Regions with no exemptions at all, and the only test was creating an EC2 instance in a blocked Region, which failed as expected, so everyone was happy.
By that evening every deployment pipeline was failing. The pipelines created IAM roles for new services and IAM calls were now denied, and Route 53 record changes for a marketing launch were failing too. The on-call engineers spent two hours going through IAM permissions account by account before somebody thought to look at the organization.
These days the team tests SCPs in a sandbox OU against a checklist of common calls (IAM, STS, Route 53, CloudFront, support, billing), rolls them out one OU at a time, and keeps a break-glass role excluded with aws:PrincipalArn conditions.
Common mistakes and troubleshooting
| Mistake | What happens | What to do |
|---|---|---|
| Region SCP without NotAction for global services | IAM, Route 53, billing calls denied | Exempt global services with NotAction |
| Detaching FullAWSAccess without another allow | Everything in the OU is denied | Keep FullAWSAccess unless you design an allow list |
| Expecting SCPs to protect the management account | Rules don’t apply there | Keep workloads and people out of the management account |
| Expecting SCPs to grant access | Users still get AccessDenied | Grant in IAM; SCPs only limit |
| Testing SCPs in production first | Pipelines and teams break | Test in a sandbox OU, then roll out OU by OU |
| No break-glass exception | Admins can’t fix a bad SCP quickly | Exclude a break-glass role by aws:PrincipalArn |
Interview questions
Click a question to open it. Each one is phrased the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.
Fresher level
1. Can you explain in simple words what an SCP is?
Why they ask this: They want to know you understand how companies put limits on lots of AWS accounts at once, because that’s the base of multi-account security.
How you might answer: An SCP, or service control policy, is an Organizations policy that sets the maximum permissions for users and roles in member accounts. On its own it never gives anyone access.
I usually describe it as a fence: IAM decides where you can walk, but you can’t go past the fence the SCP puts up.
2. If you attach a deny SCP at the root of the organization, does it also limit the management account?
Why they ask this: They’re checking you know where SCPs apply, because getting this wrong gives people false confidence about what’s protected.
How you might answer: No. SCPs only apply to member accounts, their root users included, and they don’t affect the management account or service-linked roles.
That’s one of the reasons I don’t keep any workloads in the management account.
3. You open Organizations and see a policy called FullAWSAccess attached everywhere. What is it, and should you remove it?
Why they ask this: They want to see you understand the default behaviour of SCPs, since removing this policy without a plan can block everything in an account.
How you might answer: FullAWSAccess is the default SCP attached to the root, every OU and every account, and it allows all actions. That’s why turning on SCPs blocks nothing until I add deny statements.
I normally leave it where it is and add my own deny SCPs on top, because taking it away without a replacement allow would block access.
2–5 years experience
4. A user with AdministratorAccess gets AccessDenied. How would you tell if an SCP is the cause?
Why they ask this: They want to see you read the error properly before guessing. SCP problems confuse people because the IAM policy looks perfectly fine.
How you might answer: I’d start with the error message. If it says “explicit deny in a service control policy” or “no service control policy allows”, that points to an SCP, and then I’d go through the SCPs on the account, its OUs and the root.
The IAM policy simulator helps too, since it can include SCPs for accounts in the organization.
5. Your company wants all work to stay in two AWS Regions. How would you enforce that without breaking things?
Why they ask this: They’re looking for careful policy design, because a badly written Region-limit SCP can block global services like IAM.
How you might answer: I’d write a deny SCP with a condition on aws:RequestedRegion and use NotAction to leave out the global services. I’d also exclude break-glass roles so we can still get in during an emergency.
I’d try it in a sandbox OU first. The other option is the AWS Control Tower Region deny control, which AWS maintains for you.
6. What’s the difference between SCPs and RCPs, and when would you use each?
Why they ask this: They want to know you’re aware of the newer controls and what each one is for, which shows you keep up to date.
How you might answer: SCPs limit what the users and roles in my accounts can do, whereas resource control policies, or RCPs, limit what can be done to the resources in my accounts, even by principals outside my organization.
So I’d use SCPs to stop my own people doing risky things and RCPs to build a data perimeter around my resources.
Senior level
7. A 300-person company runs everything in one AWS account. How would you design their account structure and guardrails?
Why they ask this: They want to hear a multi-account strategy covering separation, guardrails and access, and whether you design for safety while still letting people do their daily work.
How you might answer: I’d keep workloads out of the management account and create OUs for Security, Infrastructure, Workloads (split into prod and non-prod), Sandbox and Suspended, using Control Tower or a similar baseline.
SCPs would limit Regions, protect the logging and security services and deny root user actions, with RCPs for a data perimeter, and people would sign in through Identity Center with a permission set for each job role.
8. A new SCP just went live and production is breaking right now. What do you do?
Why they ask this: They want to see you restore service first and fix the policy afterwards, and that you learn something from the mistake.
How you might answer: Straight away I’d use the management account, or a delegated policy admin, to detach or roll back the SCP on the affected OU and check that things recover. After that I’d fix the policy and test it in a sandbox OU.
Last, I’d add the calls we missed to our test checklist so the next SCP change catches them.
Quick quiz
Q1. Which account is never affected by SCPs?
- Member accounts
- The management account
- Sandbox accounts
- Accounts in the root
Show answer
B — SCPs apply only to member accounts.
Q2. Why did iam:ListRoles fail with the simpler Region SCP?
- IAM was disabled
- IAM requests count as us-east-1
- The role was deleted
- FullAWSAccess was missing
Show answer
B — Global services need NotAction exemptions.
Q3. What does “no service control policy allows” mean?
- An explicit deny
- No SCP in the path allows the action
- The IAM policy is missing
- The Region is wrong
Show answer
B — FullAWSAccess or another allow was missing at some level.
Q4. Can an SCP give a user permissions they don’t have in IAM?
- Yes
- No, SCPs only limit
- Only for root
- Only in the management account
Show answer
B — IAM must still allow the action.
Q5. What does IAM Identity Center create in each member account?
- IAM users
- AWSReservedSSO roles from permission sets
- Access keys
- SCPs
Show answer
B — Permission sets become roles people sign in to.
Quick recap
- An organization has one management account and member accounts in OUs.
- SCPs set maximum permissions for member accounts; they never grant.
- Region SCPs must exempt global services with NotAction.
- Removing FullAWSAccess turns SCPs into an allow list and can lock out an OU.
- IAM Identity Center gives people one sign-in and permission sets per account.
Next lesson
Lesson 34: CloudFormation: infrastructure as code → Next you’ll describe infrastructure in a template, deploy and update it with change sets, and roll back safely when something goes wrong.
Further reading: service control policies
Want to go deeper into service control policies? Read Service control policies (SCPs) and What is IAM Identity Center?. You can also see the full plan for this course on the AWS Cloud Administration course page.
