AWS IAM Policy Evaluation Practice: Allowed or Denied?
Unlimited AWS IAM policy evaluation practice. Each problem gives one request and the policies that apply: decide if it is allowed or denied, then pick the statement that decides it. A wrong answer names the slip, such as counting a permissions boundary as a grant.
The request
The policies that apply
What decides it?
Accounts, names and buckets are invented. Every request is an Amazon S3 action by an IAM user or a role session. Resource control policies, role trust policies and KMS key policies are left out.
AWS exam prep
Reading IAM policies is in the exam guides for the Solutions Architect Associate, Security Specialty, CloudOps Engineer Associate and DevOps Engineer Professional. Start with the free real exam questions, then get the full pack.
IAM policy FAQ
In what order does AWS evaluate IAM policies?
AWS first looks for an explicit Deny in every policy that applies to the request. One Deny that applies gives a final decision of Deny. With no Deny, the request still needs an Allow where one is required: in the SCPs of the organization, then in a resource-based policy or an identity-based policy, and then in the permissions boundary and the session policy when they are present.
What is the difference between an implicit deny and an explicit deny?
An explicit deny comes from a Deny statement that applies to the request, and it overrides any Allow. An implicit deny is the default: it happens when no Deny statement applies but no Allow statement applies either.
Does an SCP or a permissions boundary grant permissions?
No. An SCP never grants permissions, and a permissions boundary limits a user or role but does not provide permissions on its own. Each one must allow the action, and the grant itself still has to come from an identity-based or resource-based policy. A session policy limits a role session in the same way.
Is a bucket policy enough without an identity policy?
In the same account, yes, when the bucket policy names the IAM user. An Allow in either the identity-based policy or the resource-based policy is enough, and a grant made directly to the IAM user is not limited by an implicit deny in the identity policy or the permissions boundary. Across accounts, no: both sides must allow.
What does a cross-account request need?
Two evaluations, one in each account. The identity-based policy in the account of the requester must allow the action, and the resource-based policy in the other account must allow the requester. The request is allowed only if both return Allow. The resource-based policy can name the whole account or one of its users or roles.
How do NotAction and NotResource work?
NotAction matches every action except the ones listed, and NotResource matches every resource except the ones listed. With Allow, everything that is not listed is allowed. With Deny, everything that is not listed is denied, and the listed items are not allowed by that statement: they only fall outside it.
What happens when a condition key is missing from the request?
The values do not match and the condition is false, so the statement does not apply. Two exceptions: an operator that ends in IfExists is true when the key is missing, and an operator that requires the key not to match, such as StringNotLike or StringNotEquals, is also true when the key is missing.
Does * in a Resource match a slash?
Yes. In a resource ARN the asterisk can replace everything within a segment, including a forward slash. So arn:aws:s3:::media/* covers media/img/a.png as well as media/a.png. In an Action, * matches any characters and ? matches one character, and action names are case insensitive.
Why does a bucket ARN not cover the objects in the bucket?
A statement applies only when its Resource matches the resource in the request. arn:aws:s3:::media is the bucket, and an object in it is arn:aws:s3:::media/a.png. To cover objects, the statement needs a pattern such as arn:aws:s3:::media/*.
Which AWS exams cover IAM policy evaluation?
The SAA-C03 guide lists an authorization model with IAM users, groups, roles and policies, and SCPs for multiple accounts. The SCS-C03 guide lists permission boundaries, session policies, resource policies for cross-account access and SCPs. The SOA-C03 guide lists resource policies and policy conditions, the DOP-C02 guide lists identity-based, resource-based and session policies, and the SAP-C03 guide lists cross-account access, permissions boundaries and session policies.
What does this drill leave out?
Resource control policies, IAM role trust policies, KMS key policies, federated users, a role session named in a resource-based policy, and conditions with more than one key or value. A bucket policy never appears together with a permissions boundary, a session policy or an SCP, and the principal is never the account root user or in the management account.
Sources
- AWS IAM User Guide, How AWS enforcement code logic evaluates requests to allow or deny access: every request is implicitly denied by default; one explicit deny that applies gives a final decision of Deny; an Allow is needed in the SCPs, in a resource-based or identity-based policy, in the permissions boundary and in the session policy; a resource-based policy that grants directly to the IAM user is not affected by an implicit deny in the other policies.
- AWS IAM User Guide, Policy evaluation logic, Policy evaluation for requests within a single account and The difference between explicit and implicit denies: in one account an Allow in either the identity-based or the resource-based policy is enough; identity-based policies and a permissions boundary give the intersection; a Deny statement trumps an Allow statement.
- AWS IAM User Guide, Cross-account policy evaluation logic: the request is allowed only if the evaluations in both accounts return Allow.
- AWS IAM User Guide, Permissions boundaries for IAM entities and Policies and permissions in AWS Identity and Access Management: a permissions boundary and a session policy limit permissions and do not grant them.
- AWS Organizations User Guide, Service control policies (SCPs): an SCP never grants permissions, and SCPs do not affect users or roles in the management account.
- AWS IAM User Guide, policy elements Action, NotAction, Resource, NotResource, Condition and Condition operators: the * and ? wildcards, case insensitive action names, * in a resource ARN also matching a forward slash, NotAction and NotResource matching everything except what is listed, and a context key that is not in the request counting as a mismatch.
- AWS Certification exam guides: Solutions Architect Associate (SAA-C03), Security Specialty (SCS-C03), CloudOps Engineer Associate (SOA-C03), DevOps Engineer Professional (DOP-C02) and Solutions Architect Professional (SAP-C03).
- Checked 20 November 2026. The tool's own approach: problems are invented and use Amazon S3 actions only; the cases listed under "What does this drill leave out?" never appear; "The checks" groups the documented steps into five lines. An independent re-solver (a separate walk through the documented flow charts) agreed with the drill on 20,000 generated problems.
Checked 20 November 2026 against the AWS IAM User Guide, the AWS Organizations User Guide and the AWS Certification exam guides.
- DrillServiceNow ACL practiceDecide if a read or write is granted and tap the ACL that decides it.
- DrillvSphere HA slot policy practiceWork out slot size, slots per host and Current Failover Capacity on new clusters.
- CalculatorUptime and SLA calculatorAllowed downtime for any availability percentage, plus composite SLA for services in series, redundant paths and regions, with practice problems.