Introduction
Access to some AWS resources require an AWS Security Token Service session where an MFA key has been used to generate the temporary security credentials for an IAM User. This page provides details on how to use MFA and STS together on the command line with AWS CLI (v1).
Prerequisites
- Identity the IAM user that you will be using with STS.
- This IAM user must have access keys. Here's how to create and manage access keys for your IAM user: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
- This IAM user must have an MFA device set. Here's how to manage MFA for your IAM user: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html