A service control policy (SCP) is a rule you attach to your whole AWS Organization, an OU or an account. What an SCP denies, nobody in that account can do anymore, not even an administrator. That makes SCPs the strongest guardrails you have in AWS.
We use ten SCPs as the baseline for an AWS Organization. They are free on GitHub: Forrict/aws-scp-baseline, checked automatically against the official AWS reference.
How an SCP works
The most important thing to remember: an SCP grants no permissions. AWS says it literally: no permissions are granted by an SCP. An SCP sets the maximum permissions. An action is only allowed if the user’s or role’s IAM policy allows it, and the SCPs don’t block it.
| Fact | What it means |
|---|---|
| Applies to everyone in the account | Including the root user of a member account |
| Doesn’t apply to the management account | Users and roles there are not affected. That’s why nothing should run there |
| Doesn’t apply to service-linked roles | AWS services working through such a role are not restricted |
| FullAWSAccess is still needed | With Deny statements only, you need the default FullAWSAccess policy, or every action fails |
| Only with “all features” | SCPs are not available if your Organization only uses consolidated billing |
The limits
| Limit | Value |
|---|---|
| Maximum size of one SCP | 10,240 characters |
| SCPs directly attached to the root, an OU or an account | at most 10 per target |
| Elements that are not allowed | Principal and NotPrincipal |
Watch the size: in the console, spaces and line breaks between JSON elements are not counted; through the CLI or an SDK they are.
The ten SCPs
| # | What it blocks | Why |
|---|---|---|
| 1 | An account leaving the organization | An account that leaves the organization also leaves every guardrail |
| 2 | All actions by the root user in member accounts, except centrally started root tasks | Nobody should work as root day to day |
| 3 | Regional actions outside eu-central-1 and eu-west-1 | Workloads and data stay in the EU Regions you choose; global services are exempt |
| 4 | Stopping, deleting or changing CloudTrail | Attackers turn off logging first |
| 5 | Disabling GuardDuty or hiding findings | Threat detection stays on and visible |
| 6 | Stopping or deleting the AWS Config recorder, delivery channel, rules and conformance packs | Config is your inventory and compliance history |
| 7 | Disabling Security Hub or Security Hub CSPM, disabling standards | The central security overview stays complete |
| 8 | Deleting IAM Access Analyzer analyzers or archiving findings | Unintended external access stays visible |
| 9 | Creating IAM users, access keys and console passwords | People sign in through IAM Identity Center, machines use roles |
| 10 | Changing the account-level S3 Block Public Access setting | A bucket can’t be made public by turning the account setting off |
Policy 2 relies on centralized root access: from the management account you can delete the root credentials of member accounts and run short, scoped root tasks with sts:AssumeRoot. Those tasks keep working, because the SCP only blocks root sessions without the aws:AssumedRoot condition key.
Policy 3 resembles the AWS Control Tower Region deny control, and uses the same list of exempt global services. Using Control Tower? Then enable the built-in control instead of this policy. We go into that in a later post.
Exception roles
Policies 3 to 10 don’t apply to two roles: AWSControlTowerExecution, the role Control Tower uses to manage your accounts, and GuardrailAdmin, an example name for your own platform or security role. Replace the latter with the role you actually use. Without such a role, only the management account can still change these settings.
Validated, not just written
An SCP with a typo in an action name doesn’t block what you think it blocks. That’s why the repository checks every policy automatically, on every push and weekly:
| Check | Against |
|---|---|
| Valid JSON, no duplicate keys | The JSON specification |
SCP grammar: Version 2012-10-17, only allowed elements, no Principal | AWS documentation on SCP syntax |
| Size at most 10,240 characters, with and without whitespace | AWS Organizations quotas |
| Every action, including wildcards, exists | The AWS Service Authorization Reference, the machine-readable list AWS publishes |
| Every condition key and operator is valid | The same reference plus the global IAM keys |
The tests also run the checks against deliberately broken policies (a typo in an action, a wrong condition key, a Principal, a policy that is too large) and fail if any of them passes. As a second opinion, a script in the repository can have IAM Access Analyzer validate each policy; that needs AWS credentials.
How to roll them out
- Adjust the Regions and the exception role to your own situation.
- Attach to a test OU first, with a test account in it. The AWS whitepaper recommends a Policy Staging OU for exactly this purpose.
- Look in CloudTrail for
AccessDeniederrors and fix what you block by accident. - Roll out OU by OU, starting with the least critical.
Mind the limit of 10 SCPs per target. FullAWSAccess is itself a directly attached SCP, so together that’s 11. Spread them over the root and your OUs, or merge a few. The diagram above shows an example split.
Our take
This section is Forrict’s opinion, based on our own experience.
Start with the protective policies. Policies 1, 4 to 8 and 10 protect what is already there and rarely get in the way of daily work. Policies 2, 3 and 9 have more impact and need more preparation.
An SCP doesn’t replace good IAM. It’s a safety net. You still grant the permissions themselves with permission sets and roles.
Test, test, test. An SCP that is too broad can stop every account under an OU in one go.
Want help choosing and rolling them out, or does this fit into a broader landing zone? See AWS landing zones. Want to know where you stand first? That starts with an AWS security assessment.
Sources
- AWS documentation: Service control policies (SCPs)
- AWS documentation: SCP syntax
- AWS documentation: Quotas for AWS Organizations
- AWS documentation: Centralize root access for member accounts
- AWS: Service Authorization Reference (machine-readable)
- AWS Samples on GitHub: service-control-policy-examples
Forrict
AWS expert and consultant at Forrict, specializing in cloud architecture and AWS best practices for Dutch businesses.