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?

Answer to see the checks.

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.

AWS SAA-C031,019 real exam questions · US$39
Free: 255 questionsGet the full pack
AWS SCS-C03143 real exam questions · US$39
Free: 36 questionsGet the full pack
AWS SOA-C03200 real exam questions · US$39
Free: 50 questionsGet the full pack
AWS DOP-C02480 real exam questions · US$39
Free: 115 questionsGet 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

Checked 20 November 2026 against the AWS IAM User Guide, the AWS Organizations User Guide and the AWS Certification exam guides.

More free tools

All free tools