CmdID

CmdID / aws / aws iam

aws iam enable-mfa-device

Enables the specified MFA device and associates it with the specified IAM user. AWS CLI reference

1 example 4 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To enable an MFA device

The following enable-mfa-device example assigns the MFA device with the serial number arn:aws:iam::123456789012:mfa/BobsMFADevice to the user Bob. The command also synchronizes the device with AWS by including the first two codes in sequence from the virtual MFA device. Before you assign a virtual MFA device to a user, you create it by using the create-virtual-mfa-device command.

aws iam enable-mfa-device --user-name Bob --serial-number arn:aws:iam::123456789012:mfa/BobsMFADevice --authentication-code1 123456 --authentication-code2 789012Identify
--user-nameThe name of the IAM user for whom you want to enable the MFA device.
--serial-numberThe serial number that uniquely identifies the MFA device.
--authentication-code1An authentication code emitted by the device.
--authentication-code2A subsequent authentication code emitted by the device.

This command produces no output.

For more information, see Enabling a virtual multi-factor authentication (MFA) device in the AWS IAM User Guide.

Options

4 in the AWS CLI reference
--authentication-code1An authentication code emitted by the device.
--authentication-code2A subsequent authentication code emitted by the device.
--serial-numberThe serial number that uniquely identifies the MFA device.
--user-nameThe name of the IAM user for whom you want to enable the MFA device.