SCPs and RCPs
How service and resource control policies are evaluated, what they cannot restrict, and common guardrail patterns.
Exam tasks: 6.1 (skill 6.1.3 organization policies)
The decision: which organization policy caps the permission (SCP for principals, RCP for resources) and what can it never restrict?
A service control policy (SCP) sets the maximum permissions for IAM users and roles in member accounts. A resource control policy (RCP) sets the maximum permissions on resources in member accounts. Neither grants anything. Effective permission is the intersection of the SCP and RCP with the identity-based and resource-based policies.
SCP versus RCP
| SCP | RCP | |
|---|---|---|
| Restricts | Principals in your member accounts | Resources in your member accounts |
| Outside principals | Not affected (they are not in your accounts) | Affected when they touch your resources |
| Management account | Not affected | Not affected |
| Service-linked roles | Not affected | Not affected |
| Root user of a member account | Affected | Affected |
| Covers | All services | A listed subset (S3, KMS, STS, SQS, Secrets Manager, ECR, CloudWatch Logs, DynamoDB and more) |
| Default policy | FullAWSAccess | RCPFullAWSAccess, cannot be detached |
| Max size | 10,240 characters | 5,120 characters |
Evaluation rules
| Rule | Detail |
|---|---|
| Allow | Needs an explicit Allow at the root, each OU on the path, and the account. Missing one level blocks everything below. |
| Deny | A Deny at any level on the path wins, even if lower levels allow it. |
| Default | FullAWSAccess is attached to every node. Removing it without a replacement blocks all actions. |
| Last SCP | Every node must keep at least one SCP. You cannot detach the last. |
| Disable and re-enable | Disabling the SCP type detaches all SCPs. Re-enabling restores only FullAWSAccess. |
| Permissions boundary | Boundary, SCP and identity policy must all allow. |
| Inheritance | Policies flow down. A Deny at the root affects every member account. |
What SCPs cannot restrict
- Any action by the management account
- Service-linked roles
- Enterprise support plan signup by root, CloudFront trusted signer, reverse DNS for Lightsail and EC2 mail by root
SCPs and the management account
SCPs and RCPs never apply to the management account, and SCPs don't limit service-linked roles. A question that needs a restriction on "every account, including the management account" can't be solved with an SCP alone, so keep workloads out of that account.
Patterns
| Goal | Approach |
|---|---|
| Block root user in member accounts | Deny all actions when the principal is the member account root user. SCPs do apply to root |
| Limit Regions | Deny with the aws:RequestedRegion condition key for Regions outside your list, with global services exempted |
| Stop leaving the org | Deny organizations:LeaveOrganization and account:CloseAccount |
| Protect security tooling | Deny disabling CloudTrail, GuardDuty, Config for all but a break-glass role |
| Allow list services | Replace FullAWSAccess with an Allow of chosen services. Remember new services are blocked by default |
| Data perimeter | RCP limiting access to your resources to your own organization's principals, and to HTTPS only |
Exam signal
"Prevent even administrators and the root user in member accounts from doing X": SCP. "Prevent an external account from reading our buckets regardless of bucket policy": RCP.
Exam trap
SCPs do not grant. A user in an account with FullAWSAccess still needs an IAM policy. Also, a Deny-only SCP at the root without any Allow leaves every account with no access.
Exam signal
Use IAM last accessed data for the organization to find services never used, then deny them. Test SCPs on a single OU or account before the root.
Related
Organizations, Control Tower. Organization policies in IAM evaluation.