Setting Guardrails with Service Control Policies and Resource Control Policies
This lesson explains AWS Organizations policies, guardrails that member account administrators cannot override, focusing on service control policies (SCPs) and resource control policies (RCPs).
Learning outcomes
After completing this lesson, you will be able to:
- Describe how OUs organise accounts for policy inheritance.
- Distinguish SCPs from RCPs.
- Describe the goals of a data perimeter.
- Protect security tooling with an SCP.
Organising accounts
Group accounts into OUs such as Security, Infrastructure, Workloads (Prod and Dev), Sandbox and Suspended. Attach policies at OU level so every account below inherits them. Keep workloads out of the management account.
Structuring an organisation
SCPs and RCPs
Service control policies and resource control policies both set the maximum permissions in member accounts, but from opposite directions. An SCP limits what principals in the accounts, including the root user, can do, for every service. Typical uses include stopping accounts from leaving the organisation and stopping anyone from disabling CloudTrail, GuardDuty, Config or Security Hub. SCPs also deny unapproved Regions with aws:RequestedRegion (exempting global services), require IMDSv2 or encryption, and deny actions by the root user.
An RCP limits what can be done to resources in the accounts, whoever makes the request, including principals from outside the organisation. It applies to supported services such as S3, STS, KMS, SQS and Secrets Manager. A typical RCP denies access to buckets unless aws:PrincipalOrgID is your organisation, with exceptions for AWS services. Then even a mistakenly permissive bucket policy cannot expose data to outsiders. The following table summarises the comparison.
aws:RequestedRegion, exempting global services); require IMDSv2 or encryption; deny root actionsaws:PrincipalOrgID is yours (with AWS service exceptions), so a permissive bucket policy cannot expose dataThe following list describes further rules that apply to both.
- Both grant nothing.
- SCPs do not apply to the management account or service-linked roles.
- An allow must exist at every level of the hierarchy; an explicit deny anywhere wins.
- Test new policies in a policy staging OU first.
The following diagram shows an SCP that protects the detective services, what it protects and where it does not apply.

SCP or RCP?
The data perimeter
A data perimeter is a set of preventive guardrails ensuring that only trusted identities access trusted resources from expected networks, and each goal has its own control. That your identities access only trusted resources is enforced by SCPs, for example denying requests to S3 buckets outside your organisation, which blocks copying data to an attacker's bucket. That only trusted identities access your resources is enforced by RCPs and resource policies, which deny principals from outside the organisation. That access comes only from expected networks is enforced by VPC endpoint policies and network conditions such as aws:SourceVpc and aws:SourceIp. The following table summarises the controls.
| Goal | Control |
|---|---|
| Your identities access only trusted resources | SCPs |
| Only trusted identities access your resources | RCPs and resource policies |
| Access only from expected networks | VPC endpoint policies and network conditions |
Data perimeter goals
Protecting the security tooling itself
An attacker who gains administrator rights in a member account will try to blind the defenders first. An SCP attached to the root denies disabling or tampering with every detective service, except for the security team's automation role:
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "ProtectSecurityServices",
"Effect": "Deny",
"Action": [
"guardduty:DeleteDetector", "guardduty:DisassociateFromAdministratorAccount", "guardduty:UpdateDetector",
"securityhub:DisableSecurityHub", "securityhub:DisassociateFromAdministratorAccount",
"config:StopConfigurationRecorder", "config:DeleteConfigurationRecorder", "config:DeleteDeliveryChannel",
"cloudtrail:StopLogging", "cloudtrail:DeleteTrail", "cloudtrail:UpdateTrail",
"access-analyzer:DeleteAnalyzer", "macie2:DisableMacie",
"organizations:LeaveOrganization"
],
"Resource": "*",
"Condition": { "ArnNotLike": { "aws:PrincipalArn": "arn:aws:iam::*:role/SecurityAutomation" } }
}]
}Even the member account's root user is bound by this SCP. Because SCPs never affect the management account, its access must be protected separately: few users, MFA, alerts on every sign-in, and no workloads.
Which identities do SCPs not affect?
Show answer
The management account and service-linked roles.
Exam Tips
Remember for the exam
- To deny all Regions except two, use an SCP with aws:RequestedRegion, exempting global services.
- To ensure no outside principal can access any bucket in the organisation, use an RCP with aws:PrincipalOrgID.
- SCPs do not affect the management account or service-linked roles.
- To stop anyone disabling GuardDuty or CloudTrail, use an SCP deny.
- SCPs and RCPs only limit; they never grant.