Detecting IAM Users Without MFA Using AWS Config, with Real-Time Admin Notifications via SNS
Introduction
Securing AWS accounts is crucial in today’s cloud-driven world. One of the simplest yet most overlooked risks is IAM users without Multi-Factor Authentication (MFA). Accounts without MFA are highly vulnerable to password leaks, phishing attacks, and unauthorized access.
In this article, I’ll show how to detect IAM users without MFA using AWS Config, validate the detection, and remediate the issue. This project can be completed in under an hour and is beginner-friendly, yet demonstrates an enterprise-grade security control.

Project Overview
The goal of this project is simple:
Enable AWS Config to continuously monitor IAM users.
Use the managed rule IAM_USER_MFA_ENABLED to flag users without MFA.
Test the rule by creating a user without MFA.
Remediate the issue by enabling MFA and verify compliance.
Notify Admin through emails for non compliance users
This setup gives you continuous visibility into your AWS account’s IAM security posture and can be extended to other compliance rules or automated remediation later.
Procedures
Step 1: Enable AWS Config
Open AWS Config in your AWS console.
Select All resources and Enable global resources (IAM is a global service).
Create a new S3 bucket for AWS Config logs and a service role.
Confirm setup.
recording on
Explanation: AWS Config records the configuration of your AWS resources and tracks changes over time. Enabling global resources ensures IAM users, roles, and policies are monitored across your account.


Step 2: Add the MFA Compliance Rule
Navigate to AWS Config → Rules → Add rule.
Select AWS managed rule: IAM_USER_MFA_ENABLED.
Save the rule with default settings.
Explanation: This rule evaluates whether each IAM user has MFA enabled.
✅ Users with MFA → COMPLIANT
❌ Users without MFA → NON_COMPLIANT
This automated check eliminates the need for manual auditing of IAM accounts.

Step 3: Test the Rule with a Non-Compliant User
Go to IAM → Users → Create User.
Create a user, e.g., test-user-no-mfa.
Enable AWS Management Console access but do NOT configure MFA.
Explanation: Creating a user without MFA simulates a real-world misconfiguration. AWS Config should detect this immediately after evaluation.
Test
Step 4: Observe Compliance Results
Go back to AWS Config → Rules → IAM_USER_MFA_ENABLED.

Wait a few minutes for evaluation.
You should see:
Status: ❌ NON_COMPLIANT
Details: User flagged (test-user-no-mfa)
Explanation: AWS Config evaluates resource changes automatically. This allows security teams to quickly identify risks without manual intervention.

Step 5: SNS notification
Step 3: Enable Config to Trigger Notifications
Use AWS Config Rules + SNS (Simplest)
AWS Config can publish to SNS when a compliance evaluation occurs.
Steps:
Go to AWS Config → setting
tick “Amazon SNS topic
select “create a topic”
Name the topic e.g ( mfa-noncompliance)
Save


Step 6: Configure endpoint for the sns topic
1. Go to SNS Topic
Click on the sns topic you created
Click on create subscription
on protocol select “email”
For endpoint input the admin email
click on create subscription


Notification received on Email

Step 7: Remediate the Issue
Go to IAM → Users → test-user-no-mfa → Security credentials.
Click Assign MFA device.
Choose Virtual MFA (e.g., Google Authenticator).
Complete setup.
Explanation: Enabling MFA significantly reduces the risk of account compromise. Once enabled, AWS Config automatically re-evaluates the user.

