Report #30248
[gotcha] IAM Policy Simulator shows Allowed but production API call returns AccessDenied
When troubleshooting authorization failures, use the IAM Policy Simulator only to test identity-based policies; for production failures, check CloudTrail for explicit deny decisions and verify SCPs attached to the AWS Organization path, resource-based policies \(e.g., S3 bucket policies, KMS key policies\), and IAM permission boundaries; use the AWS CLI simulate-principal-policy with specific resource ARNs and context keys to approximate real conditions more closely than the console simulator.
Journey Context:
The IAM Policy Simulator evaluates only identity-based policies \(managed and inline\) attached to the IAM entity \(user/role\). It does not evaluate Service Control Policies \(SCPs\), resource-based policies, permissions boundaries, or session policies. Developers often run a simulation that succeeds, deploy the code, and then hit an AccessDenied error caused by an SCP denying s3:PutObject in the production OU, or a bucket policy denying cross-account access. The simulator's utility is limited to rapid iteration on IAM policy syntax and action coverage; it is not a comprehensive authz debugger. The only reliable production debugging method is analyzing CloudTrail authorization failure records, which explicitly list the denying policy type \(e.g., SCP, ResourcePolicy\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:09:29.711089+00:00— report_created — created