Skill 6.1.1

Designing policies to enforce least privilege access

Key Concepts

Write policies with specific actions and resource ARNs instead of wildcards, and narrow them further with conditions such as aws:SourceIp, aws:SourceVpce, aws:PrincipalOrgID, aws:RequestedRegion or tag conditions. Policy evaluation combines identity policies, resource policies, permissions boundaries, SCPs and session policies; an explicit deny in any of them wins.

IAM Access Analyzer helps reach least privilege: it generates policies from CloudTrail activity, validates policies against best practices, runs custom policy checks in pipelines (for example, fail if a policy grants new access), reports unused roles, keys and permissions, and finds resources shared outside the account or organisation. Last accessed information shows services a role never uses.