Sub topic 5
Choosing an MFA factor
This chapter assumes you know what the root user is and why it needs protection, which earlier chapters cover. It also assumes you can sign in to the AWS console and run AWS CLI commands. Here you compare the MFA factor types AWS supports for the root user and decide which to register. The next chapter walks through the enrollment steps.
What a factor adds
Multi-factor authentication (MFA) asks for something you have, in addition to something you know. After you enter the root email and password, AWS also requires proof from a device you control. A stolen or phished password alone no longer opens the account.
AWS supports three families of MFA device:
- Passkeys and FIDO security keys, which use public-key cryptography (the FIDO2/WebAuthn standards).
- Virtual authenticator apps, which generate time-based one-time passwords (TOTP).
- Hardware TOTP tokens, which are small physical devices that display a TOTP code.
SMS text-message MFA is not available for AWS accounts. If you see advice that mentions it, treat that advice as out of date.
Passkeys and security keys
A passkey is a credential built on the WebAuthn standard. When you register one, your device creates a key pair. AWS stores the public key. The private key stays on the authenticator and never leaves it. At sign-in, AWS sends a challenge, and the authenticator signs it after you unlock it with a fingerprint, face scan, or PIN.
This design resists phishing. The browser includes the website's origin in what gets signed, so a look-alike domain cannot collect a response that works on the real AWS sign-in page. There is also no code for you to read out or type.
Passkeys come in two forms:
- Device-bound passkeys live on a physical security key, such as a YubiKey. The private key cannot be exported. You plug in or tap the key to sign in.
- Synced passkeys live in a platform or password-manager keystore, such as iCloud Keychain, Google Password Manager, or a third-party manager. They are convenient, and they back up across your devices. Their security depends on the account that syncs them.
For the root user, a device-bound security key kept in a safe place is the strongest choice. A synced passkey in a well-protected password manager is a reasonable second choice for individuals.
Limits to know
- Registration and sign-in need a browser and operating system that support WebAuthn. Some older browsers, remote desktop sessions, and virtual machines cannot reach the key.
- The AWS CLI cannot use a passkey directly. You use passkeys for console sign-in. For CLI work you normally use an administrative identity with its own credentials, not the root user.
- A single key can be lost, broken, or left in another building. Plan for a second device.
Virtual authenticator apps
A virtual MFA device is an app, such as Google Authenticator, Microsoft Authenticator, Authy, or a password manager with TOTP support. When you register it, AWS shows a QR code that encodes a shared secret. The app and AWS both hold that secret. Every 30 seconds each side derives a six-digit code from the secret and the current time (RFC 6238). You type the code that matches.
Strengths:
- It is free and works on any phone.
- It is easy to set up and works in any browser.
- It can also be used with the CLI, for example when you request temporary credentials for an IAM user.
Weaknesses:
- Phishable. A fake sign-in page can collect the code and replay it to AWS within the 30-second window.
- Shared secret. Anyone who photographs the QR code or copies the secret can generate valid codes. Do not screenshot the QR code and leave it in your photo roll.
- Clock sensitivity. If the phone clock drifts, codes fail. Turn on automatic time on the phone.
- Phone dependence. Losing or wiping the phone locks you out unless the app has a backup or you registered another device.
Hardware TOTP tokens
A hardware TOTP token is a small keychain device that shows a six-digit code. It uses the same algorithm as an authenticator app, so it has the same phishing weakness. It does remove the phone from the picture, and its secret is not stored on a general-purpose device. It is a niche choice. If you are buying hardware, a FIDO security key gives you more protection for similar money.
Comparison
| Factor | Phishing resistant | Works with a phone only | Backup behavior | Typical use for root |
|---|---|---|---|---|
| Device-bound security key | Yes | No, needs the key | Register a second key | Best primary or backup |
| Synced passkey | Yes | Yes | Syncs with its keystore | Good for individuals |
| Authenticator app | No | Yes | Depends on the app | Acceptable backup |
| Hardware TOTP token | No | No | Register another token | Rare |
Register more than one device
AWS lets you register up to eight MFA devices on the root user, and mixed types are allowed. Take advantage of that. A single device is a single point of failure. If it is lost, you have to go through the account recovery process, which requires access to the root email and phone number. That process works, but it is slow and stressful.
A practical pattern for a personal or small-team account:
- Register a device-bound security key as the primary factor.
- Register a second security key and store it in a different physical location.
- Optionally, register an authenticator app on a trusted phone as a third path.
For a company root user, do not tie the factor to one person's phone. Use security keys held by named custodians, with a documented procedure for who may fetch them and when.
Choosing: a decision path
Common mistakes
- Putting the factor and the email in the same basket. If your root email account is protected only by the same phone you use as an authenticator, one loss takes out both. Keep the email's own recovery and MFA independent.
- Registering only one device. See above.
- Skipping a naming convention. AWS asks for a device name. Use something that tells future you where the device lives, such as
root-yubikey-safe. Names are hard to change later. - Leaving a QR code on screen or in a screenshot. That QR code is the secret. Close the page after setup.
- Assuming a passkey on a work laptop is safe if the laptop is shared. A synced passkey is only as private as the account and device lock behind it.
Checking the result
The console shows registered devices under Security credentials. From the CLI, call the account summary. AccountMFAEnabled returns 1 when the root user has at least one MFA device.
aws iam get-account-summary \
--query 'SummaryMap.{RootMFA:AccountMFAEnabled,RootAccessKeys:AccountAccessKeysPresent}'Expected output when the account is in good shape:
{
"RootMFA": 1,
"RootAccessKeys": 0
}This check tells you MFA is on, but not which factor type you chose or how many devices exist. For that, look at the Security credentials page while signed in as root.
For comparison, IAM users can list their devices from the CLI. Replace the user name with your own.
aws iam list-mfa-devices --user-name aliceAn IAM user with a TOTP device can then request temporary credentials that carry the MFA context. The serial number below is a placeholder:
aws sts get-session-token \
--serial-number arn:aws:iam::111122223333:mfa/alice \
--token-code 123456Exercise
You manage a small company's AWS account. The only person with the root password owns the single authenticator app on their personal phone, and they are leaving the company. Name two weaknesses in this setup and describe a better configuration for the root user.
Show answer
Weaknesses: (1) the factor is tied to one person's personal phone, so leaving or losing the phone locks the company out and forces account recovery. (2) An authenticator app is a TOTP factor, which can be phished, and there is only one registered device, so there is no backup. A better setup registers two device-bound FIDO security keys (mixed types are allowed, up to eight devices) as the root MFA, stored in separate secure locations with named custodians. Optionally add an authenticator app on a company-managed device as a third path. Also move the root email to a shared, protected mailbox so it does not depend on the departing person.
Exercise
Which command confirms that the root user has MFA turned on, and what value should the AccountMFAEnabled field show?
Show answer
Run aws iam get-account-summary (with the query shown in this chapter, or without it). AccountMFAEnabled should be 1. A value of 0 means the root user has no MFA device.