AWS MFA session manager
Install
pip install aws-sesh
Setup
mkdir ~/.aws
cd ~/.aws
mkdir profiles
For each profile save the following:
accessKeys.csv
: AWS access keysdevice.txt
: AWS MFA device
The final directory should look like this
.aws
├── config
├── credentials
└── profiles
├── default
│ ├── accessKeys.csv
│ └── device.txt
├── foo
│ ├── accessKeys.csv
│ └── device.txt
└── bar
├── accessKeys.csv
└── device.txt
Usage
Create default credentials
with profiles
$ sesh
Create MFA session for default
profile
$ sesh --token 123456
Create MFA session for foo
profile
$ sesh --profile foo --token 123456