Why is this AWS request allowed or denied?
Follow one request from caller to action and resource, then find the exact allow, limit, or explicit deny that decides it.
LESSON GOALS
By the end, you can
- Describe an IAM request using caller, action, resource, and context.
- Find the policy layer that allows, limits, or explicitly denies that request.
01
Describe one request before reading policies
Start with one concrete request: who is calling, which action they want, which resource they want to use, and what context applies. For example: an assumed role session requests s3:GetObject on one object while using MFA from an approved network.
Authentication proves who the caller is. Authorization decides whether that caller may perform this action on this resource. Signing in with MFA can satisfy a policy condition, but MFA does not create permission by itself.
Begin from implicit deny: the request is denied unless a matching allow exists. Protect the account root user with MFA, avoid root access keys, and use attributable temporary sessions for routine work.
Write the resource precisely. An Amazon Resource Name, or ARN, identifies the requested AWS resource. A bucket ARN and an object ARN are different targets, and a policy that names one does not automatically match the other. Conditions can narrow the request further by network, time, tags, MFA, or other context.
This short request statement prevents guesswork. “The role cannot use S3” is too broad to diagnose. “This role session cannot call s3:GetObject on this object from this context” gives you a request that can be compared with policy statements one field at a time.
02
Find every policy that applies
A policy statement matters only when its action, resource, principal where required, and conditions match the request. A matching allow can grant access, but only inside every applicable permission ceiling.
A permissions boundary, session policy, or service control policy does not grant access. It limits what another policy may grant. Think of a boundary as the outside edge of a drawing: an identity policy can allow only what remains inside that edge.
An applicable explicit deny wins over every allow. If no allow survives the relevant limits, the result remains denied. Resource policies add another possible allow path, and their exact behavior depends on the account and whether they name a user, role, or role-session principal. Record the full principal ARN before using an advanced exception.
Identity policies are attached to a user, group, or role and describe what that identity may do. Resource policies are attached to supported resources and describe which principals may use them. Cross-account access often needs authorization from both the caller side and the resource side.
Evaluate the request, not the policy name. A policy called ReadOnly might still omit the exact object, and a policy called Admin cannot overcome a deny. List matching statements in a small table, then apply permission ceilings and explicit denies before deciding the final result.
03
Change the deciding layer only
When access is denied, classify each relevant statement by policy type and effect. Then name the first deciding cause: missing allow, permissions boundary, session policy, organization ceiling, resource policy, or explicit deny.
Adding AdministratorAccess is not a useful diagnosis. It cannot override an explicit deny or a permissions ceiling, and it grants unrelated actions. Change only the missing action, resource, principal, or condition in the layer that actually decided the request.
After the change, test the intended action and nearby actions that must remain denied. IAM Access Analyzer can find external access and help refine permissions from activity, but it cannot know your business intent. Keep the normalized request and negative tests so another person can reproduce the answer.
For an object-read repair, test the intended object, another object in the same prefix, a neighboring forbidden prefix, and a write action. The positive case proves useful access. The negative cases prove that the repair did not silently grant a larger resource range or a more powerful action.
If the caller changes from a role ARN to an assumed-role session ARN, run the evaluation again. Those principal forms can follow different resource-policy branches. Reusing an old conclusion without the exact account and principal form is not a shortcut; it is a different request.
DECISION TABLE
Compare the architecture constraints
| requirement | choose | because | reject |
|---|---|---|---|
| A matching explicit deny applies | Deny | Explicit deny has precedence. | Adding another allow. |
| A delegated role needs a maximum permission set | Permissions boundary | It limits grants made elsewhere. | Treating the boundary as an allow. |
| No deny; an allow survives every limit | Allow | The request is authorized in this context. | Assuming sign-in or MFA alone grants the action. |
GUIDED WORKED SCENARIO
Reason from the stated constraints
This is a guided example, not a question to memorise. The knowledge check uses new situations to test the same reasoning.
A role session requests s3:GetObject on confidential/report.csv. Its identity policy allows reads from the bucket, its permissions boundary allows reads only from public/*, and the bucket policy names the role. The role must read confidential/* but never write.
Requirements
- Allow GetObject only on confidential/*.
- Keep writes and other buckets denied.
- Keep the delegated-admin boundary.
- Use temporary role sessions.
Reasoning path
- Write down the session principal, GetObject action, object ARN, account relationship, and context.
- Check matching explicit denies and allows.
- Apply the permissions boundary because the bucket policy names the role.
- Add only confidential/* GetObject to the boundary, then test read and write cases.
Why it wins
- It repairs the policy layer that blocks the request.
- The permissions ceiling still protects other resources and actions.
- A negative write test proves that read access did not become administration.
Why the alternatives lose
Boundary still limits and policy is broad.
Becomes correct when: Broad administration is truly required and ceilings allow.Abandons authenticated least privilege.
Becomes correct when: Only intentionally public data.Removes future delegation ceiling.
Becomes correct when: Another trusted process replaces it.INTERACTIVE ARCHITECTURE VISUAL
Evaluate one IAM request in order
The role requests s3:GetObject on one object. Change the matching identity statement, boundary, and explicit deny.
× Request stopsThe identity allow falls outside the permissions boundary ceiling.
Read the diagram as text
Read a table in order: caller and request, matching allows, applicable permission ceilings, explicit denies, and final result. Stop at the first layer that prevents the requested action.
KNOWLEDGE CHECK
Answer one question at a time
Pass every question to complete this lesson. Each answer includes reasoning before you continue.
KEY TERMS
Glossary
- Authentication
- Proving which identity is making a request.
- Authorization
- Deciding whether that identity may perform an action on a resource in the stated context.
- Principal
- The person, workload, role, or session making an AWS request.
- Amazon Resource Name (ARN)
- A structured identifier for an AWS resource or principal.
- Identity policy
- A policy attached to an identity that describes what it may do.
- Resource policy
- A policy attached to a supported resource that describes which principals may use it.
- Implicit deny
- The default result when no applicable allow authorizes the request.
- Explicit deny
- A matching deny statement that takes precedence over every allow.
- Permissions boundary
- A maximum permission ceiling for an identity; it does not grant access by itself.
- Policy condition
- Extra request context, such as MFA, network, time, or tags, that must match a statement.
PRIMARY SOURCES
Verify the claims
- primarySecurity best practices in IAMaws-iam-security-best-practices · retrieved 2026-07-30
- primaryRoot user best practices for your AWS accountaws-iam-root-user-best-practices · retrieved 2026-07-30
- primaryPolicy evaluation logicaws-iam-policy-evaluation-logic · retrieved 2026-07-30
- primaryPermissions boundaries for IAM entitiesaws-iam-permissions-boundaries · retrieved 2026-07-30
- primaryUsing AWS Identity and Access Management Access Analyzeraws-iam-access-analyzer · retrieved 2026-07-30