+* **aws-iam-rotate-keys.sh** - rotate AWS access keys stored in the user's `~/.aws/credentials` file. If you have set the policy for a user to have maximum of two concurrent keys, this script will first make sure there is just one existing key by allowing user to delete an existing key that is not in use. It then proceeds to create the new keys, test that they work, replace the keys in the user's `~/.aws/credentials` file, and finally remove the old key that was replaced. The script was created and tested on macOS, but should work as-is or with minor modifications also on Linux. The script is interactive, and as such it does not take arguments. MFA is supported when used in conjunction with `awscli-mfa.sh` script.
0 commit comments