Skip to content

Deepbendu/ThreatWatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ AI-Powered Security Alert System on AWS

AWS Certified Solutions Architect Cloud: AWS Architecture: Serverless Built With Project Status: Active Learning by Building

A real-time security monitoring system for AWS โ€” built using 100% native AWS services. No complex ML setup. Just smart architecture, clean automation, and a hunger to learn cloud security.


๐Ÿ“Œ Project at a Glance

Category Details
๐Ÿ‘จโ€๐Ÿ’ป What is it? Cloud Security / DevSecOps Automation Project
๐Ÿ› ๏ธ Built With GuardDuty, Lambda, EventBridge, SNS, CloudTrail, Athena
๐Ÿ“จ What it does Sends real-time email alerts when AWS detects a threat
๐Ÿ’ผ Why it matters Demonstrates hands-on cloud security experience

๐Ÿš€ Why I Built This

As someone diving deep into cloud security, I wanted to build something practical โ€” something a real company might use. This project helped me:

  • Understand how real-time threat detection works
  • Explore how AWS services talk to each other in a secure, scalable way
  • Learn by building โ€” not just reading docs

๐Ÿง  What It Actually Does

This system acts like a 24/7 cloud watchdog ๐Ÿถ for your AWS account:

  • Tracks API activity using CloudTrail
  • Monitors traffic using VPC Flow Logs
  • Detects threats using GuardDutyโ€™s built-in AI (like brute-force or malware)
  • Triggers alerts when something suspicious happens
  • Sends you an email instantly with the alert details

And all of this happens automatically โ€” no manual intervention, no ML model training.


๐Ÿ—๏ธ Architecture Overview

  • AWS CloudTrail โ€“ Tracks API calls and user activity
  • Amazon VPC Flow Logs โ€“ Captures network traffic within VPCs
  • Amazon GuardDuty โ€“ Uses ML to detect threats (e.g., SSH brute force, malware)
  • Amazon S3 โ€“ Stores all raw logs centrally
  • Amazon Athena โ€“ SQL-based querying of logs in S3
  • Amazon EventBridge โ€“ Watches for suspicious events (like unauthorized access)
  • AWS Lambda โ€“ Sends real-time alerts when EventBridge rules match
  • Amazon SNS โ€“ Delivers security alerts via email

๐Ÿงช How I Tested It

  • Launched a test EC2 instance
  • Simulated a brute-force SSH attack
  • GuardDuty detected the attack and generated a finding โœ…
  • EventBridge picked it up and triggered a Lambda
  • Lambda formatted the alert and sent it to SNS
  • Got an alert email in real time โ€” it worked just like planned
  • Cleaned up all resources to avoid any billing surprises

๐Ÿ“ธ Screenshots

โš™๏ธ EventBridge Rule Configuration

This rule watches for specific GuardDuty events and triggers Lambda:

EventBridge Rule Configuration

๐Ÿ” Lambda Execution Log

The function runs on threat detection and pushes alerts via SNS:

Lambda Execution Log

๐Ÿ›ก๏ธ GuardDuty Detection Log

A real-time detection of a simulated brute-force attack:

GuardDuty Detection Log

๐Ÿ“Š GuardDuty Summary Dashboard

See all active findings categorized by severity:

GuardDuty Summary Dashboard

๐Ÿ“ฌ SNS Email Alert

Sample email received from SNS upon threat detection:

SNS Email Alert

๐Ÿ—‚๏ธ Project Structure

/aws-security-alert-system
โ”œโ”€โ”€ README.md                         # Full project walkthrough
โ”œโ”€โ”€ lambda/
โ”‚   โ””โ”€โ”€ alert_handler.py              # SNS email logic on threat detection
โ”œโ”€โ”€ eventbridge/
โ”‚   โ””โ”€โ”€ guardduty-event-pattern.json  # EventBridge rule for triggering Lambda
โ””โ”€โ”€ screenshots/
    โ”œโ”€โ”€ eventbridge-rule.png
    โ”œโ”€โ”€ guardduty-findings.png
    โ”œโ”€โ”€ guardduty-summary.png
    โ”œโ”€โ”€ lambda-log.png
    โ””โ”€โ”€ sns-email-alert.png

๐Ÿ’ก What I Learned

This project taught me way more than just connecting AWS services:

  • The difference between API logging and network logging
  • How event-driven architecture works in security automation
  • That you donโ€™t need to be a machine learning expert to use ML-powered tools
  • The importance of IAM roles and least privilege
  • Why cleaning up unused resources is as important as setting them up

๐Ÿ“š Tools & Services Used

AWS Service Why I Used It
GuardDuty AI-based threat detection
Lambda Real-time alert handler
SNS Instantly sends email notifications
CloudTrail Tracks user/API activity
VPC Flow Logs Captures network-level behavior
S3 Stores all logs securely
Athena Run SQL queries on logs (future use)
EventBridge Connects threat detection to action

๐Ÿ“ฌ Sample Security Alert (Email Format)

๐Ÿšจ AWS Security Alert Detected

A suspicious activity was detected in your AWS environment.

Details:
UnauthorizedAccess:EC2/SSHBruteForce
Severity: 5.3 (Medium)
Region: ap-south-1

๐Ÿงผ Clean-Up Checklist

One thing Iโ€™ve learned โ€” never leave cloud resources running.

โœ… Terminated test EC2 instance
โœ… Deleted CloudTrail trails (after testing)
โœ… Removed VPC Flow Logs
โœ… Disabled GuardDuty (after verification)
โœ… Deleted EventBridge rule and Lambda
โœ… Unsubscribed from SNS
โœ… Emptied & removed S3 buckets
โœ… Reviewed billing dashboard to confirm $0 usage


๐ŸŒฑ Whatโ€™s Next

  • ๐Ÿ” Use Athena to analyze logs in S3
  • ๐Ÿ“Š Add QuickSight or OpenSearch dashboards
  • ๐Ÿ”’ Enable Auto-Remediation (e.g., block malicious IPs automatically)
  • ๐Ÿง  Experiment with Amazon Lookout for Metrics (optional)

๐Ÿ’ฐ Cost Breakdown

One of my goals was to keep this project fully within the AWS Free Tier. Hereโ€™s how I achieved that:

Service Usage Type Cost Notes
CloudTrail Management events $0 Free for 90 days
VPC Flow Logs Limited duration + filter $0 Cost-optimized by limiting scope
GuardDuty Free trial (30 days) $0 Disabled after test to avoid charges
S3 Minimal log storage ~$0.01 Used infrequent access class
Athena No queries run (yet) $0 Planned for later
EventBridge Small volume of rules $0 Fits in free tier
Lambda Low invocations $0 Free tier covers 1M invocations/month
SNS Email alerts only $0 First 1,000 emails are free

โœ… Total Cost: $0.01 or less (Covered by AWS Free Tier)

โš ๏ธ Note: I manually disabled/deleted all services after testing to prevent unexpected billing.



๐Ÿ™‹โ€โ™‚๏ธ About Me

Deepbendu Debnath
AWS Certified Solutions Architect โ€“ Associate | Cloud Security Explorer | Full Stack Developer | C++ Problem Solver
Made with โค๏ธ in India ๐Ÿ‡ฎ๐Ÿ‡ณ

Iโ€™m a hands-on builder passionate about cloud security, automation, and meaningful tech. This project reflects my journey into DevSecOps using AWS-native services โ€” combining real-time monitoring, event-driven automation, and security-first thinking.

๐Ÿ›ก๏ธ I also hold the AWS Certified Solutions Architect โ€“ Associate credential, which deepened my understanding of building secure, scalable, and cost-optimized cloud solutions.

I didnโ€™t just build this project โ€” I built real-world cloud confidence.


๐Ÿ“ฌ Letโ€™s Connect

Iโ€™m open to:

  • ๐Ÿš€ Entry-level full-time roles
  • ๐Ÿ› ๏ธ Internships, collaborative builds, or open-source work
  • ๐Ÿค Cloud security conversations, mentorship, or guidance

๐Ÿ“ง debnathdeepbendu@gmail.com
๐Ÿ’ผ LinkedIn ย ย |ย ย  ๐Ÿ“ GitHub ย ย |ย ย  ๐Ÿงฉ LeetCode


๐Ÿ“œ AWS Certification Verification

You can verify my AWS Certified Solutions Architect โ€“ Associate credential here:
๐Ÿ”— Verify my AWS Certification ย ย |ย ย  ๐Ÿ”— Verify my Credly Badge

About

Built a cloud-based security monitoring solution on AWS using GuardDuty, Lambda, and EventBridge for real-time threat detection, alerting, log analysis, and automated incident response.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages