A handy tool for generating AWS Session Token on the fly.
In the situations where an AWS IAM user is required to have MFA authentication even from the cli.
A user must generate a Session Token using MFA Serial Number or ARN and a MFA generated token.
More information on get-session-token
Download the release binary for your OS, and run the binary with parameters.
By default (-mode conf), the program will grab session token from AWS and place it to the local AWS files (.aws/.config and .aws/.credentials).
When -mode is set to env, the credentials will be stored as environment variables.
When running in this mode, it is advisable to run the binary with exec to prevent opening a shell in shell,
as the program needs to set shell environment variables.
-conf stringAWS config file location (default "~/.aws/config")-cred stringAWS credentials file location (default "~/.aws/credentials")-duration intSession token duration (default 43200)-mfa stringMFA token for your AWS account-mode stringSet mode to store credentials as environment variables or write them to the aws credentials file(env or conf). Env mode will start a new shell with env vars loaded in. (default "conf")-profile stringAWS profile name (default "mfa_user")-region stringAWS region (default "eu-central-1")-serial stringThe identification number of the MFA device, hardware serial number or user ARN