Supports OSX/Linux (Not fully tested in Linux)
Developed in NodeJS 6.91 and aws-cli 1.11.8
- Clone down this repository.
- Ensure
NodeJSis installed on your machine. Runwhich nodefrom your terminal. - Ensure
npmis installed on your machine. Runwhich npmfrom your terminal. - Install dependencies by entering the following command
npm ifrom the projects root directory. - Ensure the AWS CLI is installed on your machine. Run
which awsfrom your terminal. - This tool utilizes "profiles" to access your AWS accounts. Setup your account profiles by running the following command,
aws configure --profile awsAccountName. Ensure when creating profiles to set the default output to "json". - Ensure the file
.aws/credentialsis in your home directory, as the tool will look there to populate accounts. - Ensure the AWS IAM account you are using has proper permissions to delete users in IAM.
- Run the tool by entering the following command
node bin/main.jsfrom the projects root directory. - Type help to see available commands (as of now their is only 1).
- When using the
delete-usercommand enter the name of the user exactly as it appears in the AWS IAM management console. Then select the accounts you want to delete the user from (this will populate from the profiles your configured earlier). Confirm you actually want to delete that user from the accounts selected. The tool will then systematically iterate through all of the selected accounts, by first searching for the user, then removing all of their access and resources (IE: MFA device, login profile, security groups, etc.), and finally attempting to delete the user.