Delegating Safely with Permissions Boundaries, Session Policies and ABAC
This lesson explains the mechanisms behind professional-level delegation questions: letting teams create roles without escalating privilege, narrowing a session below its role, and granting access by attributes so policies do not grow with every project.
Learning outcomes
After completing this lesson, you will be able to:
- Explain how guardrail policies combine with granting policies.
- Use permissions boundaries for safe delegation.
- Explain how session policies narrow a session.
- Explain how attribute-based access control scales access.
How policy types combine
Within an account, a request is allowed only if an identity-based or resource-based policy allows it, and nothing denies it. Guardrail policies never grant; they set a ceiling.
Three policy types set ceilings, each at a different scope. SCPs and RCPs are set by the organisation and cap the permissions of principals in member accounts, and the permissions on their resources. A permissions boundary is set by an administrator on a user or role and caps what that identity's own policies can grant, which lets developers create roles safely. A session policy is passed by the caller when assuming a role or federating, and caps that one session. Two types grant permissions: identity-based policies, set by administrators, and resource-based policies, set by the resource owner, which can grant access across accounts. The following table summarises the policy types.
| Policy type | Set by | Effect |
|---|---|---|
| SCP / RCP | Organization | Maximum permissions for principals / on resources in member accounts |
| Permissions boundary | Administrator, on a user or role | Maximum the identity's own policies can grant |
| Session policy | Caller, when assuming a role or federating | Maximum for that one session |
| Identity-based policy | Administrator | Grants permissions |
| Resource-based policy | Resource owner | Grants permissions, including cross-account |
An explicit deny in any of them wins. Effective permissions are the overlap of what is granted and every ceiling that applies. For cross-account access, both sides must allow: the caller's identity policy in its account and the resource policy (or role trust) in the other.
The following diagram shows how the ceilings and the granting policies combine.

Permissions boundaries for safe delegation
Developers often need to create roles for their Lambda functions. Granting iam:CreateRole and iam:AttachRolePolicy alone lets them create a role with AdministratorAccess and assume it. The standard solution:
-
Write the boundary
Write a boundary policy describing the most any developer-created role may do.
-
Require the boundary
Allow
iam:CreateRoleandiam:PutRolePermissionsBoundaryonly with the conditioniam:PermissionsBoundaryequal to that boundary's ARN. -
Protect the boundary
Deny changing or deleting the boundary policy and removing a boundary from a role.
-
Name the roles (optional)
Require a name prefix so developer roles are distinguishable.
{"Effect": "Allow",
"Action": ["iam:CreateRole", "iam:AttachRolePolicy", "iam:PutRolePolicy"],
"Resource": "arn:aws:iam::*:role/app-*",
"Condition": {"StringEquals": {
"iam:PermissionsBoundary": "arn:aws:iam::111111111111:policy/DeveloperBoundary"}}}Delegating role creation
Session policies
When calling AssumeRole, AssumeRoleWithSAML, AssumeRoleWithWebIdentity or GetFederationToken, a caller can pass an inline policy and up to ten managed policy ARNs. The session gets the intersection of the role's permissions and the session policies. A broker application can use one role for many tenants and pass a session policy restricting each session to that tenant's prefix, instead of creating a role per tenant.
Attribute-based access control
Attribute-based access control (ABAC) writes policies in terms of tags rather than resource names. A principal tagged project=phoenix may act on resources tagged project=phoenix, so new projects need correctly tagged principals and resources, not new policies. The condition key aws:PrincipalTag/key reads a tag on the calling role or user, or a session tag, and aws:ResourceTag/key reads a tag on the resource being accessed; a policy compares them. aws:RequestTag/key and aws:TagKeys examine the tags being set in a request, which is how a policy forces resources to be created with the right tags.
With federation, the identity provider passes attributes such as department or cost centre as session tags, either as SAML attributes or through attributes for access control in IAM Identity Center, so one permission set serves every team. ABAC is only as safe as the tags it relies on: policies must deny changing or removing the tags that grant access, both on principals and on resources, and must require correct tags at creation. Otherwise anyone who can retag a resource can grant themselves access to it.
ABAC
A SaaS company stores each tenant's data under an S3 prefix. A shared processing service assumes one IAM role. Security requires that a bug in tenant A's processing cannot read tenant B's data. The company wants to avoid managing a role per tenant.
A role per tenant is ruled out. Bucket policies per tenant do not help, because every request comes from the same role. The answer is a session policy (or session tags with ABAC) passed on AssumeRole for each tenant job, limiting the session to arn:aws:s3:::data/tenant-a/*. The role's own policy stays broad; each session is narrowed.
An identity policy, a permissions boundary and a session policy all apply. Which actions are allowed?
Show answer
Only actions that all three allow, and that no policy, including SCPs and RCPs, explicitly denies.
Exam Tips
Remember for the exam
- Boundaries, SCPs, RCPs and session policies only limit; something must still grant the permission.
- Delegate role creation safely with the iam:PermissionsBoundary condition and deny boundary removal.
- Session policies narrow one session; use them to share a role across tenants.
- ABAC uses aws:PrincipalTag and aws:ResourceTag; session tags carry IdP attributes into AWS.
- Protect the tags that ABAC relies on, or anyone who can retag can grant themselves access.