Interview Prep/AWS/IAM Best Practices

How do you review IAM changes before they hit production?

IntermediateProductionIAM Best Practices
Answer

IAM lives in Terraform or CloudFormation and goes through pull requests. In the pipeline we run IAM Access Analyzer policy validation (aws accessanalyzer validate-policy), the custom policy checks (check-no-new-access, check-access-not-granted, check-no-public-access) to block changes that grant new or sensitive access, plus a scanner like Checkov. Reviewers see a diff of the policy JSON, not just "role changed".

aws accessanalyzer check-access-not-granted --policy-document file://policy.json \
  --access '[{"actions":["iam:CreateUser","s3:DeleteBucket"]}]' --policy-type IDENTITY_POLICY
aws All AWS questions Roadmap: AWS core services

More on IAM Best Practices