awscreds is a CLI tool to setup aws credentials for terminal shell with MFA device authentication.
- go 1.22 x or later
- awscli
go install github.com/jedipunkz/awscreds@latest
Option | Explanation | Required |
---|---|---|
-m | MFA Number | YES |
-p | aws config profile name | YES |
-r | aws region name | YES |
-s | shell (fish, zsh, bash, sh) | No |
awscreds set -p <aws-config-profile-name> -r <region-name> -m <mfa-number> | source
eval `awscreds set -p <aws-config-profile-name> -r <region-name> -m <mfa-number>`