Skip to content

rodriguezwil/guardduty-threat-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Auto-Detect & Respond to Cloud Threats Using AWS GuardDuty + SNS Alerts

πŸ” Overview

This project sets up an automated cloud security response pipeline using:

  • Amazon GuardDuty to detect threats like port scanning, credential compromise, or unusual activity
  • Amazon SNS to send real-time alert notifications
  • EventBridge to route GuardDuty findings
  • (Optional) AWS Lambda to automatically quarantine EC2 instances
  • IAM to secure access across services

🧱 Architecture

Architecture

Diagram: GuardDuty triggers EventBridge, which notifies SNS. Lambda optionally stops the affected EC2.


πŸ“ Folder Structure

guardduty-threat-detection/
β”œβ”€β”€ README.md
β”œβ”€β”€ architecture/
β”‚   └── guardduty-sns-architecture.png
β”œβ”€β”€ eventbridge/
β”‚   └── cloudwatch-event-pattern.json
β”œβ”€β”€ sns/
β”‚   └── sns-setup-instructions.md
β”œβ”€β”€ iam/
β”‚   └── guardduty-sns-lambda-policy.json
β”œβ”€β”€ lambda/
β”‚   └── quarantine-instance.py

πŸš€ Setup Guide
βœ… Step 1: Enable GuardDuty
Go to AWS Console β†’ GuardDuty β†’ Click Enable

Wait for service to initialize and start scanning

βœ… Step 2: Create SNS Topic
See sns/sns-setup-instructions.md

βœ… Step 3: Create EventBridge Rule
Use the pattern in eventbridge/cloudwatch-event-pattern.json

Target = SNS Topic

βœ… Step 4: Add IAM Role
Use the policy in iam/guardduty-sns-lambda-policy.json

Attach it to the Lambda function (if used)

βœ… Step 5: (Optional) Deploy Lambda
Deploy lambda/quarantine-instance.py

Triggered via EventBridge

Stops the compromised EC2 instance

🧰 Tools & Services
Tool	Purpose
GuardDuty	Threat Detection
SNS	Alert Delivery
EventBridge	Trigger GuardDuty Alerts
Lambda	Auto-Remediation (optional)
IAM	Secure Permissions

πŸ“Œ Status
βœ… MVP Complete
πŸ“Š Optional: Add Power BI dashboard for alert trends
πŸ” Improvements coming soon

πŸ’Ό Author
Wilfredo Rodriguez
AWS | Cloud Security | Automation




About

Auto-detect & respond to AWS cloud threats using GuardDuty + SNS alerts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages