Skill 4.1.2
Troubleshoot and audit access issues by using AWS tools (for example, CloudTrail, IAM Access Analyzer, IAM policy simulator)
Key Concepts
CloudTrail records the failed call with errorCode AccessDenied or UnauthorizedOperation, the principal and the source. Many AccessDenied messages now name the policy type that denied the request (for example an SCP or a permissions boundary), and EC2 encoded authorisation messages are decoded with aws sts decode-authorization-message. The IAM policy simulator tests identity-based policies, permissions boundaries and SCPs for chosen actions and resources without making real calls.
IAM Access Analyzer reports resources shared outside the zone of trust (external access), unused roles, keys, passwords and permissions (unused access), and validates policies against grammar and best practices; it can also generate a least-privilege policy from CloudTrail activity. The credential report lists users and their passwords, keys and MFA status, and last accessed information shows which services a principal really uses.