Volume 3 · Chapter 7 — Identity, Security and Compliance

IAM Policy Types, Evaluation Logic, and ABAC in Depth

Goutham Mayaluri 5 min read AWSCloudIAMSecurityCompliance

7.1 Introduction

IAM is the most heavily-tested exam domain, and the earlier chapters covered identity-based versus resource-based policies and the deny-wins rule. The professional exam goes further: the full set of policy types (including permission boundaries and session policies), the exact order of evaluation when several policy types apply, condition keys, and attribute-based access control (ABAC). This chapter provides that precision, because subtle policy-evaluation scenarios are common exam questions.

7.2 The Six Policy Types

AWS has several distinct policy types, and knowing each is essential.Identity-based policiesattach to users, groups, or roles (“what can this identity do”).Resource-based policiesattach to a resource (S3 bucket, SQS queue, KMS key) and name the principals allowed - the mechanism for cross-account access.Permission boundariesset themaximumpermissions an identity can have (they don’t grant; they cap) - used to safely delegate permission management.**Service Control Policies (SCPs)**set the maximum permissions for accounts in an Organization (org-wide guardrails).Session policiesare passed when assuming a role to further restrict that session.**Access Control Lists (ACLs)**are a legacy cross-account grant mechanism (mainly S3). The key mental model: SCPs and permission boundaries and session policieslimit(set ceilings), while identity-based and resource-based policiesgrant.

flowchart TB
  Req[Request] --> SCP{Org SCP allows?}
  SCP -->|No| Deny[DENY]
  SCP -->|Yes| RB{Explicit deny in any policy?}
  RB -->|Yes| Deny
  RB -->|No| PB{Within permission boundary AND session policy?}
  PB -->|No| Deny
  PB -->|Yes| Grant{Identity or resource policy allows?}
  Grant -->|Yes| Allow[ALLOW]
  Grant -->|No| Deny

7.3 The Evaluation Logic (Full)

When multiple policy types apply, AWS evaluates them in a defined way. Start from an implicit deny. Anexplicit deny anywhereoverrides everything. Otherwise, the request must be allowed and pass every applicable boundary: it must be permitted by the Organization SCP (if any), fall within the permission boundary (if any), fall within the session policy (if any),andbe explicitly allowed by an identity-based or resource-based policy. If any ceiling (SCP, boundary, session policy) doesn’t allow the action, it’s denied even if the identity policy allows it - because those types intersect (they restrict the effective permissions). For cross-account access,boththe resource-based policy in the target account and the identity policy in the source account must allow it. The exam expects you to trace this: explicit deny wins; ceilings intersect; grants come from identity/resource policies within those ceilings.

7.4 Condition Keys, Wildcards, and Least Privilege

Policies gain precision fromcondition keys- context tests likeaws:SourceIp,aws:MultiFactorAuthPresent,aws:PrincipalOrgID(restrict to your organization),aws:SourceArn/aws:SourceAccount(prevent the confused-deputy problem), ands3:x-amz-server-side-encryption(require encryption).NotAction/NotResourceand wildcards (*) let you write broad or exception-based policies, but least privilege favours specific actions and ARNs. Two tools help: theIAM Policy Simulatortests whether a policy grants an action before you deploy, andIAM Access Analyzeridentifies resources shared externally and can generate least-privilege policies from CloudTrail activity. These enable tight, verified policies rather than over-broad grants.

7.5 ABAC vs RBAC

**Role-Based Access Control (RBAC)**grants permissions based on roles/groups - you create a policy per job function.**Attribute-Based Access Control (ABAC)**grants permissions based ontags(attributes) - a policy allows access when the principal’s tag matches the resource’s tag (e.g.aws:PrincipalTag/projectequalsaws:ResourceTag/project). ABAC scales better in large, dynamic environments because one policy covers many teams/projects - you grant access by tagging, without writing a new policy per team, and new projects need no new policies. The exam favours ABAC for scalable, tag-driven, multi-team access where RBAC would proliferate policies. For a bank with many teams and projects, ABAC lets a single policy enforce “you can only touch resources tagged with your project.”

7.6 Banking Production Scenario

A bank delegates permission management to team leads but caps them with permission boundaries so a lead can’t grant more than the boundary allows, while org-wide SCPs deny disabling encryption and restrict Regions. Policies use condition keys extensively:aws:PrincipalOrgIDrestricts resource policies to the organization,aws:SourceArnprevents confused-deputy attacks on cross-account roles, and a bucket policy denies uploads that aren’t KMS-encrypted. The bank adopts ABAC - a single policy grants engineers access only to resources tagged with their project - so onboarding a new project needs no new policies, just tags. Access Analyzer continuously flags any resource shared outside the organization, and the Policy Simulator validates changes before rollout. This layered, verified, tag-driven access model is precisely the professional-level IAM design the certification targets.

7.7 Chapter Revision Notes

  • Policy types: identity-based and resource-based (grant); SCP, permission boundary, session policy (limit/ceilings); ACL (legacy cross-account).
  • Evaluation: explicit deny wins; the request must pass SCP ∩ permission boundary ∩ session policy AND be allowed by an identity or resource policy; cross-account needs both sides to allow.
  • Condition keys (aws:SourceIp, aws:MultiFactorAuthPresent, aws:PrincipalOrgID, aws:SourceArn) add precision; prefer specific actions/ARNs over wildcards.
  • IAM Policy Simulator tests grants; IAM Access Analyzer finds external sharing and generates least-privilege policies.
  • ABAC (tag-based) scales better than RBAC (role-based) for large multi-team environments - grant access by tagging, no new policy per team.