Lesson 1 of 6 AWS Organizations and AWS Control Tower

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.

True or false

Structuring an organisation

Exam skills 6.1.1

Check the recommended way to organise accounts.

Log in to try this activity Interactive activities are free with an account.

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.

Service control policies
LimitMaximum permissions of principals (including root) in member accounts
ServicesAll
Typical useDeny leaving the org; deny disabling CloudTrail, GuardDuty, Config, Security Hub; deny unapproved Regions (aws:RequestedRegion, exempting global services); require IMDSv2 or encryption; deny root actions
Resource control policies
LimitMaximum permissions on resources in member accounts, whoever calls, including outside principals
ServicesSupported ones: S3, STS, KMS, SQS, Secrets Manager…
Typical useDeny bucket access unless aws:PrincipalOrgID is yours (with AWS service exceptions), so a permissive bucket policy cannot expose data

The 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.

An SCP at the root that protects the detective services. It denies disabling or tampering with GuardDuty, Security Hub, Config, CloudTrail, Access Analyzer and Macie, and leaving the organisation, for everyone except the SecurityAutomation role, including member accounts' root users. The management account is unaffected and needs separate protection.
SCP stands for service control policy.
Sort into groups

SCP or RCP?

Exam skills 6.1.3

Decide which organisation policy type each control needs.

Log in to try this activity Interactive activities are free with an account.

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.

GoalControl
Your identities access only trusted resourcesSCPs
Only trusted identities access your resourcesRCPs and resource policies
Access only from expected networksVPC endpoint policies and network conditions
Match the pairs

Data perimeter goals

Exam skills 6.1.3 · 5.1.2

Match each data perimeter goal with its main control.

Log in to try this activity Interactive activities are free with an account.
Worked example

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.

Check yourself

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.