Skip to content

Instantly share code, notes, and snippets.

@bdcravens
Created March 16, 2018 23:40
Show Gist options
  • Save bdcravens/02503c91b9ea15b30cd0a43152a04e15 to your computer and use it in GitHub Desktop.
Save bdcravens/02503c91b9ea15b30cd0a43152a04e15 to your computer and use it in GitHub Desktop.
Forgot AWS admin user

Assumes you forgot (or incorrectly reset) admin user, but have AWS access key/secret key ID with admin rights. You'll need to setup AWS CLI.

aws iam create-user --user-name admin2
aws iam create-login-profile --user-name admin2 --password Admin2018! --no-password-reset-required
aws iam list-groups
aws iam add-user-to-group --group-name Admins --user-name admin2

Then you can fix your original user, and delete the temp admin user you just created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment