How do you use IAM Access Analyzer in production?
IntermediateProductionIdentity, Least Privilege & OIDC for CI
Answer
Three uses:
- External access analyzer at the org level: flags S3 buckets, KMS keys, roles, queues and secrets shared outside the organization.
- Unused access analyzer: finds unused roles, access keys and permissions, which feeds right-sizing.
- Policy generation from CloudTrail activity, and policy validation / custom checks in CI:
aws accessanalyzer check-no-new-access \
--new-policy-document file://new.json --existing-policy-document file://old.json \
--policy-type IDENTITY_POLICY
We run check-no-new-access on IAM changes in Terraform PRs so a policy cannot quietly widen without an extra review.
More on Identity, Least Privilege & OIDC for CI
How do you design AWS OIDC trust for GitHub Actions so only production deploys can assume the prod role?IntermediateWhat are the common mistakes in OIDC trust policies for CI?AdvancedHow do you configure OIDC for GitLab CI to AWS?IntermediateHow do you get from "everyone has AdministratorAccess" to least privilege without breaking things?AdvancedWhat SCP guardrails do you apply across an AWS organisation?IntermediateHow do you implement just-in-time (JIT) privileged access for production?Intermediate