Your IAM role limit error: `LimitExceeded: Cannot exceed quota for PoliciesPerRole: 10`.
BeginnerTroubleshootingIAM and Access Errors
Answer
Likely causes → Managed policy attachments per role are capped at 10 by default (up to 20 by quota).
Diagnose →
aws iam list-attached-role-policies --role-name big
aws service-quotas get-service-quota --service-code iam --quota-code L-0DA4ABF3
Fix →
- Consolidate policies into fewer customer managed ones
- Request a quota increase
- Split the role by function
Prevent → Design roles per workload, not mega-roles.
More on IAM and Access Errors
`An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied` for a user who has S3 read access. What is wrong?Beginner`ExpiredToken: The security token included in the request is expired` in a long CI job. How do you fix it?Beginner`User: arn:aws:sts::111111111111:assumed-role/dev/bob is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::222222222222:role/deploy`. Why?Intermediate`An error occurred (AccessDenied) ... because no identity-based policy allows the s3:GetObject action` yet a bucket policy allows the user. Cross-account?IntermediateIAM policy validation: `MalformedPolicyDocument: Policy document should not specify a principal`. What happened?Intermediate`The security token included in the request is invalid` when using `aws` CLI.Beginner