Interview Q&A / AWS & Cloud

IntermediateQuick answer1 min readUpdated 3 Oct 2026

How does AWS decide whether a request is allowed or denied when several IAM policies apply?

SHORT ANSWER

By default everything is denied. A request is allowed only if some policy explicitly allows it, and any explicit Deny in any applicable policy overrides every Allow.

Explain it simply

Think of a college gate. The default rule is that nobody enters. A permission slip (Allow) from the department lets you in. But if the principal has written a "this student is banned" order (explicit Deny), no permission slip matters.

Example

text
Order of evaluation
 1. Is there an explicit Deny anywhere that matches?   -> DENY
 2. Otherwise, is there an explicit Allow?             -> ALLOW
 3. Otherwise                                          -> DENY (implicit)

Example
  Policy A (attached to user): Allow s3:*  on  arn:aws:s3:::reports/*
  Policy B (attached to group): Deny  s3:DeleteObject on arn:aws:s3:::reports/*

  s3:GetObject    -> allowed by A
  s3:DeleteObject -> denied, because B has an explicit Deny

Several other layers can narrow permissions even when an identity policy allows: service control policies from AWS Organizations, permissions boundaries, session policies and resource policies. The final result must be allowed by every layer that applies.

Within one account, an identity policy Allow or a resource policy Allow can be enough. For cross-account access, both the identity and the resource must allow it.

What to say in the interview

"The default is implicit deny, an explicit Allow lets the request through, and an explicit Deny always wins. Permissions boundaries, SCPs and session policies can further restrict what an identity policy allows."

Common mistakes

  • Believing an Allow in one policy can cancel a Deny in another.

#aws#iam#policies

Related questions

Practise more AWS & Cloud questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open AWS & Cloud quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.