Skip to content

Commit 22d43be

Browse files
author
Ville Walveranta
committed
Converted key rotation script to interactive (profiles, keys, and key ages are listed); added multi-profile and MFA support'
1 parent 71c8c28 commit 22d43be

File tree

2 files changed

+460
-178
lines changed

2 files changed

+460
-178
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
This repository contains non-proprietary (MIT license) utility scripts for use with AWS.
55

6-
* **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.
6+
* **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.
77

8-
* **awscli-mfa.sh** - Makes it easy to use MFA sessions with AWS CLI. Multiple profiles are supported. This is an interactive script (since it prompts for the current MFA one time pass code), and so it takes no arguments.
8+
* **awscli-mfa.sh** - Makes it easy to use MFA sessions with AWS CLI. Multiple profiles are supported. This is an interactive script (since it prompts for the current MFA one time pass code), and as such it does not take arguments.
99

1010
* **get-key-ages.py** - List the ages of all AWS IAM API keys in the account (this assumes properly configured `~/.aws/config`, and obviously sufficient access level to this information. Currently the output is tab delimited, and to the standard output, from where it can be cut-and-pasted to, say, Excel. In other words a quick-and-dirty utility script for a key age report.
1111

0 commit comments

Comments
 (0)