shuntagami / dotfiles

MacOS / Ubuntu dotfiles
MIT License
1 stars 0 forks source link

support aws-vault #20

Closed shuntagami closed 1 year ago

shuntagami commented 1 year ago

hot to setup

$ aws-vault add my
Enter Access Key ID: hogehoge
Enter Secret Access Key:
$ cat ~/.aws/config
[default]
region=ap-northeast-1
output=json

[profile my]

Then, add mfa serial like below

image

[default]
region=ap-northeast-1
output=json

[profile my]
mfa_serial=arn:aws:iam::${account_id}:mfa/${your_iam_user_name}

Then, try login

❯ aws-vault exec dev
Enter token for arn:aws:iam::${account_id}:mfa/${your_iam_user_name}

Check your session token

$ aws-vault ls
Profile                  Credentials              Sessions
=======                  ===========              ========
default                  -                        -
my                       my                       sts.GetSessionToken:1h30m38s

Set timeout for KeyChainAccess.app

image