More Info:
AWS Console Sign-In Requests Without MFA should be monitored using CloudWatch Events.Risk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS AWS
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- HIPAA
- HITRUST CSF
- ISO 27001
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are the exact steps to monitor “AWS Console sign-in without MFA” using CloudWatch via the AWS Management Console.
You now have monitoring in place: any successful AWS Console login without MFA will generate a CloudTrail event, match the metric filter, increment the metric, and trigger a CloudWatch alarm that notifies you via SNS.
1. Make sure CloudTrail is enabled and sending logs to CloudWatch Logs
- In the AWS console, go to CloudTrail.
- In the left menu, select Trails.
- If you don’t have a trail:
- Click Create trail.
- Name it (e.g.,
org-trail). - Under Storage location, choose/create an S3 bucket.
- Under CloudWatch Logs, check Enabled.
- Choose/Create a Log group (e.g.,
/aws/cloudtrail/management). - Choose/Create an IAM role for CloudWatch Logs.
- Turn on Management events (Read + Write).
- Click Create trail.
- If you already have a trail:
- Click your trail name.
- Under CloudWatch Logs, click Edit.
- Enable CloudWatch Logs and select/create a log group.
- Save.
2. Create a Metric Filter for “Console sign-in without MFA”
- Go to CloudWatch in the console.
- In the left menu, click Logs > Log groups.
-
Click the log group used by CloudTrail (e.g.,
/aws/cloudtrail/management). - Go to the Metric filters tab.
- Click Create metric filter.
-
In Filter pattern, use:
- Click Next.
-
Under Assign metric, configure:
- Filter name:
ConsoleLoginWithoutMFA - Metric namespace:
Security/CloudTrail - Metric name:
ConsoleLoginWithoutMFA - Metric value:
1
- Filter name:
- Click Next, then Create metric filter.
3. Create a CloudWatch Alarm on that metric
- Still in CloudWatch, go to Alarms > All alarms.
- Click Create alarm.
- Click Select metric.
- Navigate to the metric you just created:
- Custom namespaces >
Security/CloudTrail>Metrics with no dimensions>ConsoleLoginWithoutMFA.
- Custom namespaces >
- Select the metric and click Next.
- Set the Statistic to
Sum. - Define the threshold, for example:
- Period:
5 minutes - Threshold type:
Static - Whenever Sum is >= 1
- Period:
- Click Next.
- Under Notification, choose or create an SNS topic:
- E.g., Create new topic → name
security-alerts→ add email addresses. - Confirm the subscription via the email you receive.
- E.g., Create new topic → name
- Click Next, give the alarm a name (e.g.,
Alert-ConsoleLogin-Without-MFA), and optionally a description. - Click Create alarm.
You now have monitoring in place: any successful AWS Console login without MFA will generate a CloudTrail event, match the metric filter, increment the metric, and trigger a CloudWatch alarm that notifies you via SNS.
Using CLI
Using CLI
Below are step‑by‑step AWS CLI instructions to monitor AWS console sign‑ins without MFA using CloudWatch, based on CloudTrail logs.Assumptions:
Assume it is:
Verify it:
Capture the returned TopicArn, e.g.:Subscribe an email endpoint:Confirm the subscription from your email inbox.
This fully implements “AWS Console Sign In Without MFA Should Be Monitored” using CloudWatch and AWS CLI.
- You already have a CloudTrail trail delivering events to a CloudWatch Logs log group (replace names as needed).
- Region:
us-east-1(change where appropriate).
1. Identify your CloudTrail log group
If you don’t know it, list log groups and look for the one used by CloudTrail:2. Create a CloudWatch Logs metric filter
This filter findsConsoleLogin events where:responseElements.ConsoleLogin = "Success"additionalEventData.MFAUsed = "No"
3. Create an SNS topic for alerts (optional but typical)
4. Create a CloudWatch alarm on the metric
This example alarms if at least 1 such event occurs in a 5‑minute period:5. Test
- Have a test IAM user without MFA perform a console login.
- Wait a few minutes for CloudTrail → CloudWatch Logs → Metric → Alarm pipeline to process.
- Check the alarm status and SNS email.
Using Python
Using Python
To monitor AWS console sign-ins without MFA using CloudWatch + Python (boto3), you need to:
Non-MFA console logins typically haveAdjust for your environment if you also want to include failed logins.
- Ensure CloudTrail is enabled and delivering to a CloudWatch Logs group
- Create a metric filter in CloudWatch Logs to detect non‑MFA console logins
- Create a CloudWatch alarm on that metric
1. Prerequisites
- AWS CloudTrail enabled (at least one trail, logging Management events)
- Trail configured to send logs to a CloudWatch Logs log group (e.g.,
/aws/cloudtrail/management) - An IAM role/user with permissions for:
logs:PutMetricFilter,logs:DescribeLogGroupscloudwatch:PutMetricAlarmcloudtrail:DescribeTrails
2. Metric Filter Pattern for Console Sign‑In Without MFA
The relevant CloudTrail event isConsoleLogin in signin.amazonaws.com.Non-MFA console logins typically have
"additionalEventData": {"MFAUsed":"No"} or just "MFAUsed":"No".Use a filter pattern like:3. Python Script (boto3) to Create Metric Filter + Alarm
4. High-Level Remediation Steps
- Confirm CloudTrail is sending logs to
log_group_name. - Run the Python script (with correct region, log group, and SNS topic).
- Test: perform a console login without MFA (from a test account) and confirm:
- Metric
SecurityMonitoring/ConsoleLoginsWithoutMFAincrements - Alarm
Alert-Console-Login-Without-MFAgoes intoALARMstate and sends a notification via SNS.
- Metric
Using Terraform
Using Terraform
terraform plan should show one aws_sns_topic, one aws_cloudwatch_event_rule, one aws_cloudwatch_event_target, and one aws_sns_topic_subscription to be created.
