Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pretty usage:


screenreader friendly usage:
```
```help
--device arn:aws:iam::123456788990:mfa/mirandel-smith The MFA Device ARN. This value can also be provided via the environment variable 'MFA_DEVICE' or the ~/.aws/credentials variable 'aws_mfa_device'.

--duration DURATION The duration, in seconds, that the temporary credentials should remain valid. Minimum value: 900 (15 minutes). Maximum: 129600 (36 hours). Defaults to 43200 (12 hours), or 3600 (one hour) when using '--assume-role'. This value can also be provided via the environment variable 'MFA_STS_DURATION'.
Expand All @@ -184,13 +184,49 @@ screenreader friendly usage:

--short-term-suffix SHORT_TERM_SUFFIX To identify the short term credential section by [<profile_name>-SHORT_TERM_SUFFIX]. Omit or use 'none' to identify the short term credential section by [<profile_name>].

--assume-role arn:aws:iam::123456788990:role/RoleName The ARN of the AWS IAM Role you would like to assume, if specified. This value can also be provided via the environment variable 'MFA_ASSUME_ROLE'
--assume-role --assume arn:aws:iam::123456788990:role/RoleName The ARN of the AWS IAM Role you would like to assume, if specified. This value can also be provided via the environment variable 'MFA_ASSUME_ROLE'

--role-session-name ROLE_SESSION_NAME Friendly session name required when using --assume- role. By default, this is your local username.

--token TOKEN, --mfa-token TOKEN Provide MFA token as an argument

--no-keychain Do not use system keychain to store or retrieve long term credentials
--keychain Use system keychain to store or retrieve long term credentials

--region AWS region to authenticate to
```

### Optional Environment Variables

Here are some environment variables you can optionally set instead of passing in arguments or setting parameters in your `~/.aws/*` files.

```bash
# AWS credentails file
AWS_SHARED_CREDENTIALS_FILE='~/.aws/credentials'

# AWS config file
AWS_SHARED_CONFIG_FILE='~/.aws/config'

# AWS Credentials
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY=""

# which AWS profile to use ~/.aws/config
AWS_PROFILE='default'

# the arn of your MFA device in AWS
MFA_DEVICE=''

# this would be something like arn:aws:iam::123456788990:role/RoleName
MFA_ASSUME_ROLE=''

# duration to keep valid token for your assumed role
MFA_STS_DURATION='3600'

# default env var to use
AWS_REGION='eu-central-1'

# this is only for generating a screenshot of the help menu, used for updating the README in this repo
AWTH_SCREENSHOT='False'
```

**Argument precedence**: Command line arguments take precedence over environment variables.
Expand Down
Loading