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.
More on Secrets Management and Identity
Why is hard-coding secrets or putting them in environment variables a problem?BeginnerWhat does HashiCorp Vault provide?BeginnerExplain Vault's seal/unseal process.IntermediateWhat are Vault dynamic secrets and why are they better than static ones?IntermediateHow do Kubernetes workloads authenticate to Vault?AdvancedWhat is AWS Secrets Manager and how does it compare with SSM Parameter Store?Beginner