Interview Prep/DevSecOps/Secrets Management and Identity

How do you achieve least privilege in IAM in practice?

IntermediateConceptSecrets Management and Identity
Answer

Start from a narrow policy, not *:*. Use IAM Access Analyzer's policy generation from CloudTrail activity to tighten, and "last accessed" data to remove unused permissions. Scope with resource ARNs and conditions (aws:SourceIp, aws:RequestedRegion, MFA), and review with iam simulate-principal-policy.

aws iam generate-service-last-accessed-details --arn <role-arn>

Treat wildcards on iam:*, sts:AssumeRole and s3:* as review triggers.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Secrets Management and Identity