Report #56660
[bug\_fix] An error occurred \(AccessDenied\) when calling the GetObject operation: User: arn:aws:sts::123456789012:assumed-role/MyRole/i-0abcd1234 is not authorized to perform: s3:GetObject on resource: arn:aws:s3:::my-bucket/data.csv because no identity-based policy allows the s3:GetObject action
Attach an IAM policy to the IAM role 'MyRole' \(or the user/role indicated in the error\) that explicitly grants the 's3:GetObject' action on the specific S3 bucket ARN, or verify the role being assumed is the one intended. The root cause is an 'implicit deny' in IAM: without an explicit 'Allow' statement matching the action and resource, AWS denies all requests.
Journey Context:
Developer deploys an EC2 instance with an IAM instance profile attached, expecting to read from an S3 bucket. The application code fails with AccessDenied. The developer immediately checks the S3 bucket policy and sees it grants access to the IAM role ARN, so they assume the policy is correct. They spend an hour checking security groups, VPC endpoints, and ACLs. Finally, they use the IAM Policy Simulator and realize that while the bucket policy allows the role, the IAM role itself has no attached policy granting S3 permissions. The error message explicitly stated 'no identity-based policy allows the action', but the developer focused on the bucket policy \(a resource-based policy\). The fix is to attach an inline or managed policy to the IAM role itself with the s3:GetObject permission, resolving the implicit deny.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:35:44.326719+00:00— report_created — created