Lesson 2 of 4 Multi-Account Governance

Applying Service Control Policies and Resource Control Policies

Service control policies and resource control policies are the organisation-wide guardrails that no account administrator can override. This lesson explains how they are evaluated together with IAM policies, how inheritance and the deny-list and allow-list strategies work, the common guardrail patterns tested in the exam, and how RCPs and condition keys build a data perimeter.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain how SCPs and RCPs limit permissions without granting them and how they combine with IAM policies.
  • Describe SCP inheritance and the deny-list and allow-list strategies.
  • Interpret common SCP patterns such as Region restriction, protection of security services and roles, and preventing accounts from leaving the organisation.
  • Explain how RCPs and organisation condition keys establish a data perimeter.

How SCPs Work

An SCP defines the maximum permissions for IAM principals in the accounts it applies to. It never grants permission: a principal can perform an action only if its identity-based or resource-based policies allow it and every SCP in the path from the root to its account allows it. An explicit deny in any SCP overrides any allow. SCPs affect all principals in member accounts, including the account's root user, but they do not affect the management account, service-linked roles or principals from outside the organisation accessing resources in the account.

Inheritance works as a filter. When an organisation enables SCPs, the AWS managed FullAWSAccess policy is attached to the root, every OU and every account. For an action to be allowed, it must be allowed at every level: the root, each OU on the path and the account. Removing FullAWSAccess from an OU without attaching another allow policy denies everything in that OU.

Deny-list and allow-list strategies

In a deny-list strategy, FullAWSAccess stays attached everywhere, and additional SCPs deny specific actions. This is the common and recommended approach, because new AWS services are available by default and policies stay short. In an allow-list strategy, FullAWSAccess is replaced by SCPs that allow only approved services or actions. It gives tighter control, for example in highly regulated OUs, but every new service must be added explicitly, and the allow must be present at every level.

The following diagram follows two requests through the levels of SCPs.

How SCPs filter permissions. A request is allowed only if an IAM policy allows it and the SCPs at every level from the root through each OU to the account allow it; an explicit deny anywhere wins. A request in an approved Region passes every level. A request in another Region is stopped by the OU's deny SCP even though the IAM policy allows it. SCPs never grant permissions, and they do not affect the management account or service-linked roles.
SCPs act as filters at every level of the tree.
Select all that apply

Is the call allowed?

Exam skills 2.2.3 · 6.1.1

Identify every condition that must hold for a member account principal to call s3:PutObject.

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

Common SCP Patterns

The following patterns appear repeatedly in exam scenarios. Each uses deny statements with conditions.

Restricting Regions

Deny all actions outside approved Regions using the aws:RequestedRegion condition key. Global services, such as IAM, Organizations, CloudFront, Route 53 and AWS Support, are called through endpoints in us-east-1, so they are excluded with NotAction; otherwise the policy would break them.

{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "DenyOutsideApprovedRegions",
    "Effect": "Deny",
    "NotAction": ["iam:*", "organizations:*", "sts:*", "cloudfront:*", "route53:*", "support:*",
                  "budgets:*", "waf:*", "health:*"],
    "Resource": "*",
    "Condition": {
      "StringNotEquals": {"aws:RequestedRegion": ["eu-west-1", "eu-central-1"]},
      "ArnNotLike": {"aws:PrincipalARN": "arn:aws:iam::*:role/PlatformBreakGlass"}
    }
  }]
}

The ArnNotLike condition on aws:PrincipalARN exempts a break-glass role. AWS Control Tower provides an equivalent Region deny control. The NotAction list must cover every global service the organisation uses.

Protecting security services and baseline resources

Deny actions that would disable security tooling, such as cloudtrail:StopLogging, cloudtrail:DeleteTrail, guardduty:DeleteDetector, config:StopConfigurationRecorder and securityhub:DisableSecurityHub, for all principals except a platform role. Similarly, deny modification of baseline IAM roles, such as the roles that StackSets or Control Tower use, with a condition on aws:PrincipalARN.

Preventing accounts from leaving

Deny organizations:LeaveOrganization, so that a compromised account administrator cannot remove the account from the organisation's guardrails.

Enforcing configuration at creation

Deny ec2:RunInstances when ec2:MetadataHttpTokens is not required, deny creating unencrypted EBS volumes with ec2:Encrypted, or deny creating resources without a required tag with aws:RequestTag and Null conditions. Declarative policies now offer a simpler way to enforce some EC2 settings.

Restricting the root user

Deny all actions when aws:PrincipalArn matches the account root user, so that the root user of member accounts cannot be used for daily work. Centralised root access management lets the management account remove root credentials from member accounts and perform privileged root tasks centrally.

SCPs do not grant

If an SCP denies an action, no IAM policy in the account can allow it, including AdministratorAccess. When a scenario says that an administrator with full permissions receives an explicit deny, an SCP or RCP is the usual cause. Conversely, adding an allow to an SCP does not give anyone permission; IAM policies must still grant it.

Resource Control Policies

SCPs limit what your principals can do. They cannot stop a principal from another AWS account from accessing your resources if a resource policy, such as a bucket policy, mistakenly allows it. Resource control policies fill this gap. An RCP sets the maximum permissions on resources in member accounts for supported services, including Amazon S3, AWS STS, AWS KMS, Amazon SQS and AWS Secrets Manager, with more services added over time. RCPs apply regardless of whether the requester is inside or outside the organisation, and they do not grant permissions. The AWS managed RCPFullAWSAccess policy is attached by default.

A typical RCP denies access to S3 objects unless the principal belongs to the organisation (aws:PrincipalOrgID) or is an AWS service acting on the organisation's behalf (aws:PrincipalIsAWSService), and denies requests that do not use TLS. Even if a team adds a bucket policy granting access to an external account, the RCP prevents that access.

The following diagram compares what SCPs and RCPs limit.

SCPs and RCPs set limits from opposite sides. An SCP limits what principals in the organisation's member accounts can do, on any resource. An RCP limits what any principal, inside or outside the organisation, can do to resources in member accounts, for supported services such as Amazon S3, AWS STS, AWS KMS, Amazon SQS and Secrets Manager. A typical RCP denies S3 access unless the caller is in the organisation or is an AWS service, so a bucket policy that mistakenly grants an external account is still blocked.
Together, SCPs and RCPs form a data perimeter.

Building a Data Perimeter

A data perimeter is a set of preventive guardrails ensuring that only trusted identities access trusted resources from expected networks. It is built from three kinds of control, summarised in the table that follows.

  • Identity perimeter: resources can be accessed only by principals in the organisation, enforced with RCPs and resource policies that use aws:PrincipalOrgID.
  • Resource perimeter: principals can access only resources in the organisation, enforced with SCPs that use aws:ResourceOrgID, which prevents data from being copied to an external bucket with stolen credentials.
  • Network perimeter: access must come from the organisation's VPCs or IP ranges, enforced with conditions such as aws:SourceVpc, aws:SourceIp and VPC endpoint policies.

The table below summarises the three perimeters and the condition keys that implement them.

PerimeterQuestion it answersMain toolsKey condition keys
IdentityWho may access my resources?RCPs, resource policiesaws:PrincipalOrgID, aws:PrincipalIsAWSService
ResourceWhich resources may my principals access?SCPs, VPC endpoint policiesaws:ResourceOrgID
NetworkFrom where may access come?SCPs, RCPs, endpoint policiesaws:SourceVpc, aws:SourceIp, aws:ViaAWSService
Sort into groups

Build the data perimeter

Exam skills 2.2.3 · 6.2.1

Match each condition key with the part of the data perimeter it enforces.

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

Guardrails for a Production OU

A company's production OU must use only two EU Regions, must never disable CloudTrail or GuardDuty, must not leave the organisation, and its S3 data must never be readable by principals outside the organisation, even if a bucket policy is misconfigured.

  1. Region SCP

    Attach the Region deny SCP with the global-service NotAction list and a break-glass exemption, or enable the Control Tower Region deny control.

  2. Security SCP

    Attach an SCP denying the CloudTrail, GuardDuty, Config and Security Hub disabling actions and organizations:LeaveOrganization, except for the security automation role.

  3. RCP

    Attach an RCP that denies S3 access unless aws:PrincipalOrgID matches or the caller is an AWS service, and denies non-TLS requests.

  4. Test first

    Attach the policies to the policy staging OU and test workloads before attaching them to production.

Check yourself

An SCP denies s3:PutObject outside eu-west-1. A user in the management account uploads an object to a bucket in us-east-1 successfully. Why?

Show answer

SCPs do not apply to the management account. The guardrail affects only member accounts.

Exam Tips

Remember for the exam

  • SCPs and RCPs never grant permissions; actions need an IAM allow and must be allowed by every SCP from the root to the account; an explicit deny wins.
  • SCPs do not affect the management account or service-linked roles; RCPs limit access to resources for any requester, including external principals.
  • Region restriction uses aws:RequestedRegion with NotAction for global services.
  • Exempt automation or break-glass roles with aws:PrincipalARN conditions; deny organizations:LeaveOrganization and actions that disable security services.
  • Data perimeters combine aws:PrincipalOrgID (identity), aws:ResourceOrgID (resource) and aws:SourceVpc or aws:SourceIp (network).