Interview Prep/AWS/IAM and Access Errors

Cross-account role session shows `AccessDenied` only for `sts:TagSession` calls from an SSO flow.

AdvancedTroubleshootingIAM and Access Errors
Answer

Likely causes → Trust policy lacks sts:TagSession which is needed when sessions carry tags.

Diagnose →

aws iam get-role --role-name target
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=AssumeRole

Fix →

  1. Add sts:TagSession to the trust policy action list
  2. Retry

Prevent → Include sts:TagSession whenever you use session tags or ABAC.

aws All AWS questions Roadmap: AWS core services

More on IAM and Access Errors