Hey all,
I was surprised not to find an easy copy-pasteable script online for “how to delete AWS IAM roles & detach policies with AWS CLI in Bash”, so here’s my take. I’ve recently had to run a cleanup of some roles, so this is what I used.
roles=("RoleA" "RoleB"…