Tracing How AWS Evaluates Policy Types
This lesson explains exactly how AWS combines policy types to decide whether a request is allowed, which is central to the IAM domain, the most heavily weighted in the exam.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish policy types that grant permissions from those that only limit them.
- Trace a request through the evaluation order.
- Explain the permissions a cross-account request needs.
- Describe policy elements and global condition keys.
Policy types
AWS evaluates several types of policy for every request, and the most important distinction is whether a type grants permissions or only limits them. Two types grant. Identity-based policies, managed or inline, are attached to users, groups and roles. Resource-based policies, such as S3 bucket policies, KMS key policies, SQS queue policies and role trust policies, are attached to resources and name the principals allowed.
Four types only limit, setting a maximum that grants cannot exceed. A permissions boundary limits one user or role. A service control policy (SCP) limits the principals in an organisation's accounts, and a resource control policy (RCP) limits the resources in them. A session policy limits a single assumed-role session. Access control lists (ACLs) are a legacy way of granting access on some resources, such as S3. An explicit deny in any policy always wins. The following table summarises the types.
| Type | Attached to | Grants or limits? |
|---|---|---|
| Identity-based (managed, inline) | Users, groups, roles | Grants |
| Resource-based (incl. role trust policies) | S3, KMS, SQS and other resources | Grants |
| Permissions boundaries | Users, roles | Limits |
| Service control policies (SCPs) | Organisation, OUs, accounts (principals) | Limits |
| Resource control policies (RCPs) | Organisation, OUs, accounts (resources) | Limits |
| Session policies | A single assumed session | Limits |
| ACLs | Some resources | Grants (legacy) |
Grants or limits?
Evaluation order
AWS evaluates every request against all applicable policies in a fixed order. The evaluation proceeds as follows.
-
Implicit deny
Every request starts as an implicit deny.
-
Explicit deny
Any explicit deny ends evaluation with a deny.
-
SCPs and RCPs
They must allow the action.
-
Resource-based policies
They may allow it.
-
Boundaries and session policies
Permissions boundaries and session policies must allow it.
-
Identity-based policy
It must allow the action.
Effective permissions are the intersection of limiting policies with granting ones. SCPs do not apply to the management account or service-linked roles.
The following diagram evaluates one cross-account s3:GetObject request through each policy layer.

How AWS evaluates a request
Cross-account requests
Both the caller's identity policy and the resource policy (or the target role's trust policy) must allow it. Within one account, a resource policy naming the principal is usually enough on its own.
Same account or cross-account?
Policy elements and condition keys
IAM policies are composed of standard elements and can use condition keys to restrict access. The following list describes both.
- Elements: Effect, Action/NotAction, Resource/NotResource, Principal (resource policies), Condition. NotAction in an Allow grants everything not listed.
- Key global conditions:
aws:PrincipalOrgID,aws:PrincipalArn,aws:SourceIp,aws:SourceVpc,aws:SourceVpce,aws:RequestedRegion,aws:MultiFactorAuthPresent,aws:SecureTransport,aws:PrincipalTag,aws:ResourceTag,aws:RequestTag,aws:CalledVia,aws:ViaAWSService.
Global condition keys
Evaluating one request through every layer
A developer's role in account 222222222222 calls s3:GetObject on a bucket in account 333333333333; the object is encrypted with a KMS key in the bucket account. Each layer must be checked in turn:
Layer Must Result in this case
-------------------------------------- --------------------------- -------------------------------------
Explicit denies anywhere not match none
SCPs on the caller's account allow s3:GetObject FullAWSAccess -> allowed
RCPs on the bucket's account allow org-only RCP; caller is in org -> allowed
Caller's permissions boundary allow boundary allows s3:Get* -> allowed
Caller's identity policy allow allows s3:GetObject on the bucket -> allowed
Bucket policy (cross-account) allow the caller allows role ARN -> allowed
KMS key policy (cross-account) allow kms:Decrypt MISSING -> request fails with AccessDeniedThe request fails even though every S3-related policy allows it, because decrypting the object is a separate KMS call that the key policy does not permit, and the caller's IAM policy also needs kms:Decrypt on the key. Encryption is the most common hidden cause of cross-account S3 denials.
Can an SCP or a permissions boundary grant permissions?
Show answer
No. SCPs, RCPs, permissions boundaries and session policies only limit; they never grant.
Exam Tips
Remember for the exam
- An explicit deny always wins.
- For cross-account access, both the identity policy and the resource policy must allow the action.
- SCPs, RCPs, permissions boundaries and session policies only limit; they never grant.
- SCPs do not apply to the management account or to service-linked roles.
- An allow with NotAction grants everything except the listed actions.