Skip to content

A hands-on cloud security project to monitor and alert on AWS root account usage. This setup uses AWS CloudTrail to log activity, EventBridge to detect root login events, and SNS to send email or SMS alerts instantly.

Notifications You must be signed in to change notification settings

chukwupg/Root-Account-Monitoring-AWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Root Account Monitoring with CloudTrail + SNS

πŸ“Œ Overview

This project is part of my #100DaysOfCybersecurity Challenge.
The goal is to detect and respond to AWS root account usage, which is one of the most sensitive and high-risk actions in any AWS environment; using CloudTrail, SNS, and EventBridge.


🎯 Objectives

βœ… Simulate sensitive activity from the AWS root account
βœ… Detect the root account login using CloudTrail
βœ… Trigger an SNS alert via EventBridge when the root account is used


πŸ›  Tools Used

  • AWS Management Console
  • CloudTrail
  • SNS (Simple Notification Service)
  • EventBridge (formerly CloudWatch Events)
  • S3 (for storing CloudTrail logs)

πŸ“ Steps & Screenshots

1. Log in Using the Root Account

  • Performed login using the root account for simulation. Step 1 Screenshot

2. Perform a Sensitive Action

  • Sensitive Action: Enabled Multi-Factor Authentication (MFA).
  • This ensures CloudTrail logs the root account activity.
    Step 2 Screenshot

3. Enable CloudTrail

  • Created a trail: root-account-monitoring-trail
  • Configured to log all management events to an S3 bucket server-logstash.
    Step 3 Screenshot

4. Verify Logs in S3

  • Confirmed that CloudTrail logs are stored in the S3 bucket.
    Step 4 Screenshot

5. Set Up SNS Topic & Subscription

  • Topic: root-account-alerts
  • Subscribed my email to receive alerts and confirmed the subscription.
    Step 5 Screenshot

6. Create EventBridge Rule (Root Account Usage)

  • Created a rule: root-account-usage-alert
  • Event Pattern:
{
  "source": ["aws.signin"],
  "detail-type": ["AWS Console Sign In via CloudTrail"],
  "detail": {
    "userIdentity": {
      "type": ["Root"]
    }
  }
}

Step 6 Screenshot


7. Test the Setup

  • Logged in again as root
  • Received SNS alert via email Step 7 Screenshot

βœ… Verification

  • CloudTrail Logs: Confirmed root account sign-in recorded in CloudTrail.
  • SNS Alert: Email received within seconds of login.

πŸ“– What I Learned

  • Root account usage should always be monitored.
  • CloudTrail + EventBridge + SNS provides near real-time alerting for sensitive actions.
  • Alerts like this are essential for detecting unauthorized root account use.

πŸ”— Next Steps

  • Extend this to monitor other sensitive activities (e.g., IAM policy changes).

✍ Author

πŸ‘©β€πŸ’» Chukwu PraiseGod
Follow my journey: X | LinkedIn

About

A hands-on cloud security project to monitor and alert on AWS root account usage. This setup uses AWS CloudTrail to log activity, EventBridge to detect root login events, and SNS to send email or SMS alerts instantly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published