Skip to main content
AWS GuardDuty Architecture

Module Overview

Estimated Time: 2-3 hours | Difficulty: Intermediate | Prerequisites: AWS Security fundamentals
AWS GuardDuty is an intelligent threat detection service that continuously monitors your AWS accounts and workloads for malicious activity and delivers detailed security findings for visibility and remediation. Think of GuardDuty as a security analyst who never sleeps — it watches your VPC flow logs, CloudTrail events, and DNS queries 24/7, looking for patterns that indicate compromise: crypto-mining on your EC2 instances, data exfiltration from S3, brute-force attempts against your databases, or API calls from known malicious IP addresses. The key advantage over building your own detection: GuardDuty uses machine learning trained on threat intelligence from across all of AWS, which means it catches threats most custom rule-based systems would miss. What You’ll Learn:
  • GuardDuty data sources and finding types
  • Enabling and configuring GuardDuty
  • Understanding and responding to findings
  • Multi-account management
  • Automated remediation patterns

How GuardDuty Works


Data Sources

VPC Flow Logs

Network traffic patterns, unusual ports, crypto mining

CloudTrail Events

API calls, unauthorized access, privilege escalation

DNS Logs

Command & control communication, DNS tunneling

S3 Data Events

Suspicious S3 access patterns, data exfiltration

EKS Audit Logs

Kubernetes API calls, container escape attempts

Lambda Network

Unusual Lambda network activity, cryptomining

Enabling GuardDuty

Console or CLI

CloudFormation


Protection Features

1. S3 Protection

Monitors CloudTrail S3 data events for anomalous access:
  • Unusual API calls from known malicious IPs
  • S3 data exfiltration patterns
  • Anonymous access attempts
  • Access from Tor exit nodes

2. EKS Protection

Monitors Kubernetes workloads:

3. Malware Protection

Scans EBS volumes for malware:

4. RDS Protection

Detects suspicious database login activity:
  • Brute force attempts
  • Login from unusual locations
  • Anomalous database access patterns

5. Lambda Protection

Monitors Lambda network activity:
  • Cryptocurrency mining
  • Communication with malicious IPs
  • Unusual network patterns

Finding Types

Severity Levels

Finding Categories

Example Findings


Multi-Account Management

Organization Setup

Enable Organization


Filtering and Suppression

Trusted IP Lists

Threat IP Lists

Suppression Rules


Automated Remediation

EventBridge Rule

Remediation Lambda


Integration with Security Hub


Best Practices

Enable All Regions

Attackers target inactive regions—enable GuardDuty everywhere

Use Organizations

Centralize management with a delegated administrator account

Automate Response

Use EventBridge + Lambda for automated remediation

Tune Carefully

Use suppression rules sparingly — every suppressed finding type is a blind spot. Document the business justification for each suppression rule and review them quarterly

Cost Optimization


🎯 Interview Questions

GuardDuty = Threat detection (finds active threats)
  • Uses ML and threat intelligence
  • Analyzes VPC Flow Logs, CloudTrail, DNS
  • Generates findings for active threats
Inspector = Vulnerability scanning Security Hub = Aggregation and compliance Macie = Data classification (PII detection) Detective = Investigation and forensics
  1. Immediate: Review finding details and affected resources
  2. Containment: Isolate compromised resources (quarantine SG)
  3. Investigation: Use Detective or CloudTrail for forensics
  4. Remediation: Remove malware, rotate credentials
  5. Recovery: Restore from known-good state
  6. Lessons Learned: Update automation, add preventive controls
  1. Validate: Confirm it’s truly a false positive
  2. Trusted IPs: Add corporate IPs to trusted IP list
  3. Suppression Rules: Create filters for known patterns
  4. Avoid Over-Suppression: Don’t suppress severity levels
  5. Document: Keep records of suppression decisions

Hands-On Lab

1

Enable GuardDuty

Enable GuardDuty with all protection features in your account
2

Generate Sample Findings

Use aws guardduty create-sample-findings to generate test findings
3

Create EventBridge Rule

Set up a rule to send high-severity findings to SNS
4

Build Remediation Lambda

Create a Lambda that isolates compromised EC2 instances
5

Test End-to-End

Trigger sample finding and verify remediation executes

Next Module

AWS Security Hub

Centralized security posture management and compliance