Interview Prep/AWS/IAM Best Practices

How do you remove long-lived access keys from an existing estate?

IntermediateProductionIAM Best Practices
Answer

Inventory with the credential report (aws iam generate-credential-report then get-credential-report), group keys by consumer, then migrate each: EC2/ECS/Lambda to roles, EKS to Pod Identity or IRSA, CI to OIDC federation, on-prem servers to IAM Roles Anywhere, laptops to Identity Center. Deactivate before deleting, watch aws iam get-access-key-last-used and CloudTrail for breakage, then add an SCP denying iam:CreateAccessKey so they never come back.

aws All AWS questions Roadmap: AWS core services

More on IAM Best Practices