Volume 11 · Chapter 8 — Banking Production Support and Troubleshooting
IAM and Access Troubleshooting
8.1 Introduction
“Access Denied” is one of the most common - and most confusing - production issues on AWS, because a request can be blocked by any of several policy types. This chapter provides a systematic method for diagnosing access problems, using the evaluation logic and the tools (Policy Simulator, Access Analyzer, CloudTrail) an architect must know.
8.2 The Systematic Access-Denied Diagnosis
When a request is denied, work through the policy types in evaluation order rather than guessing. First, is there anexplicit denyanywhere - in the identity policy, a resource policy, apermission boundary, anSCP, or a session policy? An explicit deny overrides everything, so a common cause is an SCP or permission boundary higher up denying the action even though the identity policy allows it. Second, is the actionallowedby an identity-based or resource-based policy, and does it fall within every ceiling (SCP ∩ boundary ∩ session policy)? Third, for cross-account, doboththe resource policy (target) and the identity policy (source) allow it? The systematic order: check for explicit denies (including SCPs/boundaries), then confirm an allow within all ceilings, then check both sides for cross-account. This traces the exact reason rather than over-granting blindly.
flowchart TD
Denied[Access Denied] --> D1{Explicit deny anywhere? SCP/boundary/session/resource}
D1 -->|Yes| FixDeny[Remove/adjust the deny - often an SCP or boundary]
D1 -->|No| D2{Allowed by identity OR resource policy?}
D2 -->|No| FixAllow[Add the specific allow]
D2 -->|Yes| D3{Within SCP ∩ boundary ∩ session policy?}
D3 -->|No| FixCeiling[Ceiling too restrictive]
D3 -->|Yes| D4{Cross-account? both sides allow?}
D4 -->|No| FixXAcct[Fix resource policy or source permission] 8.3 The Diagnostic Tools
AWS provides tools to diagnose access. TheIAM Policy Simulatortests whether a set of policies allows a specific action on a resource, showing which policy statement is decisive - the fastest way to confirm whether and why an action is allowed or denied.CloudTrailrecords the denied API call with the error, so you can see exactly which action and resource were denied and by which principal.IAM Access Analyzeridentifies external access and can validate/generate policies, and itspolicy generationbuilds a least-privilege policy from CloudTrail history (useful when a role needs exactly the permissions it actually uses). For KMS-related denials, remember thekey policyis authoritative - a role can be denied use of an encrypted resource because the KMS key policy doesn’t grant it, not the IAM policy. These tools turn access troubleshooting from guesswork into precise diagnosis.
8.4 Common Access Pitfalls
Recurring causes: an SCP or permission boundary denying the action despite an identity allow (check the ceilings first); a missing KMS key-policy grant blocking use of an encrypted bucket/volume even when S3/EBS permissions are fine; a cross-account call where the resource policy doesn’t name the source (or vice versa); an IAM role not actually attached (missing instance profile / task role / IRSA); a condition key (like requiring MFA or a source IP) not satisfied; and an explicit deny from an organization guardrail. The fix is always to identify the specific blocking element via the systematic order and tools, then grant the minimal missing permission or adjust the offending ceiling - never to attach broad admin permissions as a shortcut, which creates the over-permissioning problem.
8.5 Banking Production Scenario
A bank’s payment service suddenly gets Access Denied writing to a bucket. The on-call engineer checks CloudTrail (sees the exact denied action and principal), then the Policy Simulator, which shows the identity policy allows it but an SCP on the production OU denies writes without encryption - the request lacked the required encryption header. Another denial, reading an encrypted object, turns out to be a missing decrypt grant in the KMS key policy, not an S3 issue. A cross-account access failure is traced to the target’s resource policy not naming the new source role. Each is fixed by granting the specific missing permission or satisfying the condition, verified in the simulator. This systematic, tool-driven access troubleshooting is exactly the professional-level IAM competence the certification targets.
8.6 Chapter Revision Notes
- Diagnose Access Denied in order: explicit deny anywhere (SCP/boundary/session/resource) → allowed by identity/resource policy → within all ceilings → cross-account both sides allow.
- An SCP or permission boundary denying the action (despite an identity allow) is a common cause - check ceilings first.
- Tools: Policy Simulator (test/which statement decides), CloudTrail (the exact denied call), Access Analyzer (external access + generate least-privilege policy).
- KMS key policy is authoritative - denial on an encrypted resource is often a missing key-policy grant, not the IAM policy.
- Fix by granting the specific missing permission or adjusting the ceiling/condition - never attach broad admin as a shortcut.