How do I type in the MFA code when using the AWS CLI? I have checked the documentation page of IAM http://docs.aws.amazon.com/cli/latest/reference/iam/index.html.
I
Step-by-step manual solution:
aws sts get-session-token --serial-number arn-of-the-mfa-device --token-code code-from-token
arn-of-the-mfa-device: visible from your user IAM
aws iam list-mfa-devices --user-name ryancode-from-token: 6 digit code from your configured MFA device
aws configure --profile cli
aws configure set --profile mfa aws_session_token
aws_session_token is not included in aws configure
aws s3 ls --profile cli