AWS Certified DevOps Engineer – Professional
Permissions boundary vs SCP vs RCP: which limit applies (DOP-C02)
A permissions boundary caps one IAM user or role. A service control policy caps the IAM users and roles in an organization's member accounts. A resource control policy caps access to resources in member accounts. Per the IAM and AWS Organizations user guides, none of the three grants permissions, and SCPs and RCPs skip the management account.
What does a permissions boundary limit?
A permissions boundary is a managed policy set on an IAM user or role. The entity can perform only the actions allowed by both its identity-based policies and its boundary. The boundary grants nothing by itself. In the AWS example, a user whose boundary allows Amazon S3, CloudWatch and Amazon EC2 cannot create an IAM user even with a policy that allows iam:CreateUser.
Resource-based policies interact with boundaries in a way the exam tests. Within the same account, a resource-based policy that grants access to an IAM user ARN is not limited by an implicit deny in that user's boundary. A grant to an IAM role ARN is limited by an implicit deny in the role's boundary. A grant made directly to a role session ARN is not.
Do not use a resource-based policy statement with NotPrincipal and a Deny effect for principals that have a boundary. It always denies them. AWS recommends the ArnNotEquals condition with aws:PrincipalArn instead.
What does a service control policy limit?
SCPs set the maximum available permissions for the IAM users and roles in an organization, including a member account's root user. They are available only when the organization has all features enabled, not with consolidated billing features alone. An SCP never grants permissions.
SCPs do not affect users or roles in the management account. They do apply to member accounts that are delegated administrators. They do not apply to principals from accounts outside the organization, and they do not affect resource-based policies directly.
When an SCP, a permissions boundary and an identity-based policy all apply to a request, it is allowed only if all three allow it. An explicit deny in any of them wins. AWS recommends testing an SCP on a small OU before attaching it to the root, and not removing FullAWSAccess without a replacement that allows the needed actions.
What does a resource control policy limit?
RCPs set the maximum available permissions for resources in an organization. AWS's guidance is to use an SCP to limit the IAM principals inside your member accounts, and an RCP to restrict principals outside your organization that request access to resources in your member accounts.
Like SCPs, RCPs need all features enabled and grant nothing. RCPs do not affect resources in the management account. They apply to member accounts, including delegated administrators. They apply only to the AWS services that support RCPs.
The effective permissions are the intersection of what the SCPs and RCPs allow and what the identity-based and resource-based policies allow.
Where the exam catches people
- Believing a boundary limits every grant to an IAM user: in the same account, a resource-based policy that names the user ARN is not held back by the boundary's implicit deny.
- Believing an SCP or RCP attached to the root covers the management account: neither affects the management account.
- Believing an SCP grants permissions: it only sets a ceiling. Identity-based or resource-based policies must still allow the action.
- Believing an SCP stops outside principals that a bucket policy lets in: SCPs apply only to principals in the organization's accounts. That is the job of an RCP.
- Believing a delegated administrator account is exempt like the management account: SCPs and RCPs apply to delegated administrator member accounts.