Setup is a command line tool for assuming role. You can easily manage assume role and change role anytime you want.
I recommend this tool if you are managing multiple AWS account. Easily get assume credentials and paste it to your terminal.
- If you want to use setup command, then you need to set up..
- aws configure
$ brew tap devopsartfactory/devopsart
$ brew install setup
$ setup version
- Session name should be your original IAM user name in the account from which you log in through console.
$ setup init
? Your session name: <Session name>
$ setup add
? Key: dev
? Role ARN: arn:aws:iam::1234567891011:role/XXXX
$ setup list
[current role list]
dev
- You can choose one key from the list or just specify the key next to command
$ setup
? Choose account: dev
Assume Credentials copied to clipboard, please paste it.
$ setup dev
Assume Credentials copied to clipboard, please paste it.
$ setup edit
? Choose account to edit: dev
? New role ARN: <New Role ARN>
$ setup delete
? Choose account to delete: dev
dev is deleted
$ setup ls
[current role list]