Lab5 : Enabling a virtual multi-factor authentication (MFA)
You can use a phone or other device as a virtual multi-factor authentication (MFA) device. To do this, install a mobile app that is compliant with RFC 6238, a standards-based TOTP (time-based one-time password) algorithm. These apps generate a six-digit authentication code.
Enable a virtual MFA device for an IAM user (console)
To enable a virtual MFA device for an IAM user (console)
- Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.
- In the navigation pane, choose Users.
- In the Users list, choose the name of the IAM user.
- Choose the Security Credentials tab. Under Multi-factor authentication (MFA), choose Assign MFA device.
- In the wizard, type a Device name, choose Authenticator app, and then choose Next.
IAM generates and displays configuration information for the virtual MFA device, including a QR code graphic. The graphic is a representation of the « secret configuration key » that is available for manual entry on devices that do not support QR codes.
- Open your virtual MFA app. For a list of apps that you can use for hosting virtual MFA devices, see Multi-Factor Authentication.
If the virtual MFA app supports multiple virtual MFA devices or accounts, choose the option to create a new virtual MFA device or account.
- Determine whether the MFA app supports QR codes, and then do one of the following:
- From the wizard, choose Show QR code, and then use the app to scan the QR code. For example, you might choose the camera icon or choose an option similar to Scan code, and then use the device’s camera to scan the code.
- From the wizard, choose Show secret key, and then type the secret key into your MFA app.
When you are finished, the virtual MFA device starts generating one-time passwords.
- On the Set up device page, in the MFA code 1 box, type the one-time password that currently appears in the virtual MFA device. Wait up to 30 seconds for the device to generate a new one-time password. Then type the second one-time password into the MFA code 2 box. Choose Add MFA.
Important
Submit your request immediately after generating the codes. If you generate the codes and then wait too long to submit the request, the MFA device successfully associates with the user but the MFA device is out of sync. This happens because time-based one-time passwords (TOTP) expire after a short period of time. If this happens, you can resync the device.
The virtual MFA device is now ready for use with AWS. For information about using MFA with the AWS Management Console, see Using MFA devices with your IAM sign-in page.
Replace a virtual MFA device
- To deactivate the device currently associated with another IAM user, see Deactivating MFA devices.
- To add a replacement virtual MFA device for another IAM user, follow the steps in the procedure Enable a virtual MFA device for an IAM user (console) above.
- To add a replacement virtual MFA device for the AWS account root user, follow the steps in the procedure Enable a virtual MFA device for your AWS account root user (console).