Home > Blog > AWS AWS Certified Solutions Architect - Associate > AWS IAM Policy Evaluation Logic Explained

AWS IAM Policy Evaluation Logic Explained

Deep Dive Cert Sensei Team 2035-08-28 10 min read

AWS IAM policy evaluation follows a strict logic flow: it starts with a default deny, then evaluates all applicable policies. If any policy contains an explicit deny, the request is denied immediately. Otherwise, an explicit allow is required to grant access. This hierarchy ensures security across SCPs, boundaries, and resource policies.

#AWS IAM #SAA-C03 #Cloud Security #AWS Certification

How does the basic IAM evaluation flow work?

When you make a request to an AWS service, the IAM engine doesn't just look for a 'Yes' or 'No'—it follows a very specific sequence. By default, every single request starts with an implicit deny. This means that unless a policy explicitly allows the action, the answer is automatically 'No.' This 'secure by default' posture is a cornerstone of the AWS Shared Responsibility Model and a frequent topic on the SAA-C03 exam.

The engine then gathers all applicable policies: identity-based policies, resource-based policies, permissions boundaries, and Service Control Policies (SCPs). It evaluates these in a specific order to determine the final outcome. If the engine encounters an explicit deny anywhere in this chain, the evaluation stops immediately, and the request is rejected. We see many students struggle with this on their first attempt because they assume an 'Allow' in one place overrides a 'Deny' elsewhere. In AWS, the 'Deny' always wins.

Why does the 'Explicit Deny' always take priority?

In the world of AWS security, the Explicit Deny is the 'Golden Rule.' No matter how many 'Allow' statements you attach to a user, role, or group, a single 'Deny' statement in any applicable policy will override them all. For example, if you have a policy granting a developer full S3 access (AdministratorAccess) but another policy specifically denying access to the 'Production-Logs' bucket, that developer will be blocked from the logs every single time.

From a practical architectural standpoint, this is incredibly powerful. It allows you to create 'guardrails' for your environment. You can grant broad permissions to a team to encourage agility, while using explicit denies to protect mission-critical resources like billing data or root-level configurations. When you're practicing with our Cert Sensei SAA-C03 question sets, pay close attention to scenario questions that list multiple policies; always look for the 'Deny' first to save yourself time and avoid common traps.

What is the difference between Identity-based and Resource-based policies?

This is where things get interesting for the Solutions Architect exam. Identity-based policies are attached to a principal (User, Group, or Role). They define what that identity can do. Resource-based policies, on the other hand, are attached directly to the resource—think S3 Bucket Policies, KMS Key Policies, or SQS Queue Policies. They define who is allowed to access that specific resource.

For requests within the same AWS account, the logic is additive: an 'Allow' in either the identity-based policy OR the resource-based policy is sufficient to grant access (provided there is no explicit deny). However, the rules change entirely for cross-account access. In a cross-account scenario, you need an 'Allow' in BOTH the identity-based policy of the requester AND the resource-based policy of the owner. If either side is missing the permission, the request is denied. Understanding this distinction is critical for designing secure multi-account architectures.

How do SCPs and Permission Boundaries restrict access?

If identity and resource policies are the 'keys' to the door, Service Control Policies (SCPs) and Permission Boundaries are the 'fences' around the building. Neither of these tools can grant permissions; they can only restrict them. An SCP, managed via AWS Organizations, defines the maximum available permissions for an entire account. If an SCP denies `ec2:TerminateInstances`, no user in that account—not even the root user—can terminate an instance, regardless of their IAM policies.

Permission Boundaries work similarly but at the user or role level. They set the 'ceiling' for what a principal can do. If a user has an IAM policy allowing `S3:*` but a Permission Boundary that only allows `S3:Get*` and `S3:List*`, the user will be unable to upload or delete files. On the SAA-C03, you'll often see questions asking why a user with 'FullAdmin' permissions still can't perform a specific task. The answer is almost always a restrictive SCP or Permission Boundary.

How is access handled during cross-account requests?

Cross-account access is a high-yield topic for the SAA-C03. The logic flow here requires a 'handshake' between two accounts. First, the identity in Account A must have a policy that allows them to assume a role or access a resource in Account B. Second, the resource in Account B must have a resource-based policy (or a role trust policy) that explicitly grants access to the principal from Account A.

If you are designing a solution where an application in a 'Dev' account needs to write to a bucket in a 'Logging' account, you must configure both sides. If you only configure the bucket policy, the user in the Dev account will still be blocked by their own account's implicit deny. This is a common point of failure in real-world deployments. We recommend using our custom quiz builder with domain filtering to focus specifically on 'Identity and Access Management' to master these multi-account logic flows.

How can you effectively prepare for IAM questions on the SAA-C03?

IAM is one of the most nuanced parts of the AWS Certified Solutions Architect Associate exam. You cannot pass by simply memorizing definitions; you must be able to trace the logic flow of a request through multiple layers of policy. The exam will present you with a complex scenario and ask you to identify the 'most secure' or 'least privileged' way to grant access.

To bridge the gap between theory and passing, we provide 1,000 expert-curated SAA-C03 practice questions. Each question comes with detailed expert reasoning that explains not just why the correct answer is right, but why the distractors are wrong. By leveraging our performance analytics, you can track your progress at the domain level, ensuring you've mastered the IAM evaluation logic before you sit for the actual exam. Remember, the goal isn't just to pass—it's to be able to implement these security patterns in a production environment.

❓ Frequently Asked Questions

If a user has an allow in an identity policy but a deny in an SCP, can they access the resource?

No. The SCP acts as a filter for the entire account. Because an explicit deny always takes priority over any allow, the request will be denied regardless of the identity-based permissions.


Do I need both a bucket policy and an IAM policy for same-account access?

No. For resources within the same account, an 'Allow' in either the identity-based policy or the resource-based policy is sufficient to grant access, provided there is no explicit deny.


What happens if there is no 'Allow' statement in any applicable policy?

This results in an 'Implicit Deny.' AWS defaults to a secure state; if no policy explicitly grants permission for the requested action, the request is automatically denied.

More from AWS AWS Certified Solutions Architect - Associate

🧠

Test Your Knowledge

Ready to practice AWS Certified Solutions Architect - Associate? Put what you've learned to the test.

Try 10 Free Questions

⭐ 1,000 expert-curated questions available with Premium

Upgrade Premium
📖 Browse the Glossary

Join thousands of certification students

Sign Up Free