Topic lessonTopic: IAM: roles and permission limits
Explicit vs implicit Deny in IAM: reason about one request at a time
An explicit Deny comes from an applicable Deny statement; an implicit denial means the required permission has not been established. Both deny access, but adding an Allow affects them differently. Hold the principal, action and resource constant in a report-reading example to separate evidence from unknowns.
Distinguish applicable Deny from missing permission for the same request, without treating another action’s Allow or a nonmatching condition as evidence of success.
Action identifies the operation, Resource the target, and Effect Allow or Deny. Identity-based policies attach to identities; resource-based policies attach to resources. Begin with a synthetic identity-only example, then add the context required for real IAM evaluation.
Fix one request before reading policies
- Read report → Applicable statementsMatch the same principal, action, resource and request conditions.
- Applicable statements → Denial evidenceRecord reasons after checking applicability; not a live AWS execution timeline.
- Read report
- Principal: ReportReader. Action: s3:GetObject. Resource: monthly PDF.
- Applicable statements
- Match action, resource and conditions.
- Denial evidence
- Separate explicit Deny, missing required Allow and unknowns.
Fix ReportReader’s GetObject request for the monthly PDF. An Allow for another resource, for PutObject, or under a condition that does not match need not permit this request. Check applicability, rather than reading Effect in isolation.
Compare three controlled cases
| Case | Allow for this GetObject | Deny for this GetObject | Conclusion within this example |
|---|---|---|---|
| A | Absent | Absent | Implicit denial: no required grant |
| B | Present | Absent | Allowed within this restricted example |
| C | Present | Present | Explicit denial overrides Allow |
Case B is not proof that a live AWS report can be read. It is a specified identity-only comparison with no other policies or restrictions. Real access can depend on resource policies, organization controls, encryption and other applicable conditions.
Choose an option to see the result and explanation.
Not matching a Deny is not the same as being allowed
A statement denying deletion does not directly deny a GetObject request for the monthly PDF. But if there is no required read grant elsewhere, reading is implicitly denied. Falling outside a Deny does not create an Allow.
Choose an option to see the result and explanation.
For real IAM, identify grant recipients and restrictions
| Policy/control | Key question | Faulty shortcut |
|---|---|---|
| Identity/resource policy | Which principal, operation and grant path? | An identity Allow is always the only grant source |
| Boundary/session policy | How is this grant path constrained? | An Allow in the limiter grants access on its own |
| Organizations SCP/RCP | Which principal/resource restrictions apply? | Every identity in an organization has the same restrictions |
| Same/cross-account context | Is the grant to a user, role or session? | One union/intersection formula covers every case |
A permissions boundary limits identity-policy grants; a session policy constrains a session. An SCP (Service Control Policy) limits covered organization principals, while an RCP (Resource Control Policy) constrains covered resources. Do not add every policy type together as if each were a grant.
Choose an option to see the result and explanation.
Separate an error message from established denial causes
- Record one attempt’s principal, action, resource and conditions.
- Find applicable Deny statements and required Allow grants.
- Review resource, boundary, session and organization-control applicability.
- Separate reasons named by the error from controls not yet checked.
- Confirm the intended least-privilege scope and authorized change process before widening access.
Check, then explain in your own words
- Fix the action, resource and conditions of one request.
- Separate explicit Deny from missing required permission.
- Distinguish grants from limits and record evidence and unknowns.
Check your understanding: Can you conclude “allowed” because you found no Deny?
Not without establishing the required Allow and applicable restrictions.
Absence of explicit denial is not a grant. Keep the principal, resource and account relationship explicit.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
Scope and conditionsApplicable request context, explicit versus implicit deny, identity/resource/session evaluation and service exceptions; not a universal union/intersection equation.
Used in this lessonFix one request before reading policies Compare three controlled cases For real IAM, identify grant recipients and restrictions Separate an error message from established denial causes
Scope and conditionsApplicable explicit Deny overrides Allow; absence of applicable Allow is implicit denial; request-scoped synthetic examples.
Used in this lessonFix one request before reading policies Compare three controlled cases Not matching a Deny is not the same as being allowed
Scope and conditionsIdentity permission ceiling; no grant by boundary; same-account user/role/session direct resource grants; explicit deny and NotPrincipal warning.
Used in this lessonFor real IAM, identify grant recipients and restrictions
- Service control policiesChecked:
Scope and conditionsSCP does not grant; all-features/member accounts/delegated admins/root; management and service-linked role exceptions; resource-account SCP is not direct control of outside principals.
Used in this lessonFor real IAM, identify grant recipients and restrictions