Skip to content

Lesson 09 โ€” Multi-Factor Authentication (MFA)

Learning Path

โ˜๏ธ Phase 2 โ€“ AWS Cloud Security

๐Ÿ“˜ Module 02 โ€“ Identity & Access Management (IAM)


By the end of this lesson, you will be able to:

  • Explain what Multi-Factor Authentication (MFA) is.
  • Understand why MFA is critical for cloud security.
  • Configure MFA for the AWS Root User.
  • Configure MFA for IAM Users.
  • Understand different MFA device types.
  • Apply enterprise MFA best practices.
  • Troubleshoot common MFA issues.

๐Ÿ“š Lesson Information

Estimated Time: 3 Hours

Difficulty: Beginner

Prerequisites: Lesson 08 โ€“ Least Privilege & Permission Boundaries

Hands-on Lab: Yes

Assignment: Yes


Passwords are no longer enough.

Every day attackers use:

  • Password guessing
  • Credential stuffing
  • Phishing
  • Password leaks
  • Brute-force attacks

If an attacker steals an employeeโ€™s password, they may gain complete access to cloud resources.

Multi-Factor Authentication (MFA) provides an additional layer of security by requiring another form of verification before access is granted.

For enterprise organisations, MFA is one of the simplest and most effective security controls.


CloudNova Technologies has recently experienced multiple phishing emails targeting employees.

One developer unknowingly entered their AWS password into a fake login page.

Fortunately, the account had MFA enabled.

Although the attacker knew the password, they could not log in because they did not have the second authentication factor.

The incident was contained without any impact to the business.

Following this incident, the CISO announced:

โ€œMFA will be mandatory for every privileged account in our AWS environment.โ€


Multi-Factor Authentication (MFA) requires users to verify their identity using two or more authentication factors.

Instead of relying only on a password, users must also provide an additional verification factor.

Authentication becomes significantly more secure because attackers must compromise multiple factors.


Authentication generally falls into three categories.

  • Password
  • PIN
  • Passphrase

  • Mobile Authenticator App
  • Hardware Security Key
  • MFA Token
  • Smart Card

  • Fingerprint
  • Face Recognition
  • Iris Scan

AWS MFA commonly uses:

  • Something You Know (Password)
  • Something You Have (Authenticator Device)

User
โ”‚
Username
โ”‚
Password
โ”‚
MFA Code
โ”‚
Authentication Successful
โ”‚
AWS Console

Even if the password is stolen, the attacker still requires the MFA code.


Without MFA

Password Stolen
โ†“
Attacker Logs In
โ†“
AWS Environment Compromised

With MFA

Password Stolen
โ†“
MFA Required
โ†“
Attacker Blocked
โ†“
Environment Protected

AWS supports several MFA device options.

Device Description
Virtual MFA Mobile authenticator applications
Hardware MFA Physical security devices
FIDO2 Security Key USB or NFC hardware security keys
Passkeys Supported authentication methods for compatible devices

Virtual MFA devices are the most common choice for personal learning environments.


Examples include:

  • Google Authenticator
  • Microsoft Authenticator
  • Authy
  • 1Password
  • Bitwarden Authenticator

Each generates a new six-digit code every 30 seconds.


The AWS Root User has unrestricted access to the AWS account.

For this reason:

  • MFA must always be enabled.
  • Root credentials should rarely be used.
  • Root access should be securely stored.
  • Root login should be monitored.

The Root User should only be used for tasks that require root privileges.


Privileged IAM Users should also use MFA.

Examples include:

  • Cloud Administrators
  • Security Engineers
  • Cloud Engineers
  • DevOps Engineers

Read-only users may also use MFA depending on organisational policy.


CloudNova defines the following MFA requirements.

User Type MFA Required
Root User Yes
Cloud Administrators Yes
Security Team Yes
Cloud Engineers Yes
Developers Yes
Finance Yes
Auditors Yes
Service Roles No
Lambda Roles No
EC2 Roles No

IAM Roles do not require MFA because they use temporary credentials instead of passwords.


Avoid the following:

โŒ Sharing MFA devices.

โŒ Disabling MFA for convenience.

โŒ Using the Root User daily.

โŒ Storing MFA recovery codes insecurely.

โŒ Ignoring lost devices.


  • Enable MFA immediately after creating users.
  • Require MFA for all privileged accounts.
  • Protect the Root User with MFA.
  • Use IAM Roles instead of shared accounts.
  • Monitor failed login attempts.
  • Review MFA status regularly.
  • Replace lost MFA devices immediately.

๐Ÿงช Enterprise Mission 01 โ€” Review MFA Status

Section titled โ€œ๐Ÿงช Enterprise Mission 01 โ€” Review MFA Statusโ€

Open the AWS Console.

Navigate to:

IAM
โ†“
Users
โ†“
Select User

Review:

  • Console Access
  • MFA Status
  • Last Sign-in

Questions:

  • Which users do not have MFA enabled?
  • Which accounts represent the highest risk?

๐Ÿงช Enterprise Mission 02 โ€” Enable MFA for an IAM User

Section titled โ€œ๐Ÿงช Enterprise Mission 02 โ€” Enable MFA for an IAM Userโ€

Navigate to:

IAM
โ†“
Users
โ†“
alice.dev
โ†“
Security Credentials
โ†“
Assign MFA Device

Choose:

Virtual MFA Device

Scan the QR code using an authenticator application.

Enter two consecutive MFA codes.

Save the configuration.


๐Ÿงช Enterprise Mission 03 โ€” Verify MFA Login

Section titled โ€œ๐Ÿงช Enterprise Mission 03 โ€” Verify MFA Loginโ€

Sign out of the AWS Console.

Sign in again using:

  • Username
  • Password
  • MFA Code

Confirm successful authentication.


๐Ÿงช Enterprise Mission 04 โ€” Review Root User MFA

Section titled โ€œ๐Ÿงช Enterprise Mission 04 โ€” Review Root User MFAโ€

Sign in using the Root User.

Navigate to:

Account
โ†“
Security Credentials
โ†“
Multi-Factor Authentication

Verify that MFA is enabled.

If MFA is not configured, enable it.


๐Ÿงช Enterprise Mission 05 โ€” List Virtual MFA Devices

Section titled โ€œ๐Ÿงช Enterprise Mission 05 โ€” List Virtual MFA Devicesโ€

Open PowerShell.

Run:

Terminal window
aws iam list-virtual-mfa-devices

Review:

  • Serial Number
  • Enable Date
  • Assigned User

๐Ÿงช Enterprise Mission 06 โ€” Review IAM Account Summary

Section titled โ€œ๐Ÿงช Enterprise Mission 06 โ€” Review IAM Account Summaryโ€

Run:

Terminal window
aws iam get-account-summary

Review:

  • Users
  • MFA Devices
  • Password Policy
  • Account Security

Document your observations.


๐Ÿงช Enterprise Mission 07 โ€” Simulated Security Incident

Section titled โ€œ๐Ÿงช Enterprise Mission 07 โ€” Simulated Security Incidentโ€

CloudNova receives an alert.

An attacker has obtained the password for:

john.security

Questions:

  • Can the attacker log in?
  • What happens if MFA is enabled?
  • What should the Security Team do next?

Document your response.


๐Ÿงช Enterprise Mission 08 โ€” MFA Compliance Review

Section titled โ€œ๐Ÿงช Enterprise Mission 08 โ€” MFA Compliance Reviewโ€

Review all CloudNova users.

Prepare a compliance report showing:

  • Users with MFA enabled.
  • Users without MFA.
  • High-risk accounts.
  • Recommendations.

CloudNova plans to expand globally.

The organisation will soon employ more than 1,000 users across multiple AWS accounts.

Management requires:

  • Mandatory MFA.
  • Centralised identity management.
  • Secure authentication for privileged users.
  • Compliance with industry security standards.

Prepare a recommendation for implementing MFA across the organisation.


  1. What is Multi-Factor Authentication?

  2. Why is MFA more secure than using a password alone?

  3. What are the three authentication factors?

  4. Why must the AWS Root User always use MFA?

  5. Which AWS identities commonly require MFA?

  6. Which CLI command lists virtual MFA devices?

  7. Why donโ€™t IAM Roles require MFA?

  8. What should be done if an employee loses their MFA device?

  9. How does MFA reduce phishing risks?

  10. Why is MFA considered a security best practice?


Prepare an Enterprise MFA Implementation Guide.

Include:

  • What is MFA?
  • Authentication Factors
  • MFA Device Types
  • Root User Security
  • IAM User MFA
  • Enterprise MFA Policy
  • AWS CLI Commands Used
  • Screenshots
  • Lessons Learned

Length: 4โ€“5 Pages


Task Status
Reviewed IAM User MFA Status โ˜
Enabled MFA for an IAM User โ˜
Verified MFA Login โ˜
Reviewed Root User MFA โ˜
Listed Virtual MFA Devices โ˜
Reviewed IAM Account Summary โ˜
Completed Security Incident Exercise โ˜
Completed Compliance Review โ˜
Completed Assignment โ˜

After completing this lesson, you should understand:

  • Multi-Factor Authentication significantly improves AWS account security.
  • MFA combines multiple authentication factors to verify user identity.
  • The AWS Root User should always have MFA enabled.
  • Privileged IAM Users should use MFA to reduce the risk of unauthorised access.
  • Regular MFA compliance reviews help maintain a secure enterprise environment.

  • AWS IAM User Guide โ€“ Multi-Factor Authentication
  • AWS Security Best Practices
  • AWS IAM Best Practices
  • AWS Well-Architected Framework โ€“ Security Pillar
  • AWS IAM CLI Reference

โžก๏ธ Lesson 10 โ€” AWS IAM Identity Center (AWS Single Sign-On)