Resolve Must Detach Policies Error with AWS CLI in Terminal on Mac - VicPhanDevOps/mac GitHub Wiki

• The following resolution is for if you receive an error saying you must detach all policies before deleting a user.
image

• Type aws iam list-attached-user-policies --user-name < username > and press the return key to list the attached policies for the user.
image

• Type aws iam detach-user-policy --user-name < username > --policy-arn < ARN > and press the return key to detach the policy from the user.
image

⚠️ **GitHub.com Fallback** ⚠️