Cloud Logging, Monitoring & Threat Detection
You cannot defend what you cannot see. This lesson covers the cloud-native logging and monitoring services that give you visibility into your cloud environment — AWS CloudTrail, Azure Monitor, and GCP Cloud Audit Logs — and how to use them to detect attacks in progress. You will learn what events to alert on, how attackers try to evade logging, and how to build a basic cloud SIEM pipeline.
Learning Objectives — Deep Dive
Each objective below is broken down into plain English so you know exactly what you are learning, why it matters, and what you will be able to do when you are done. Mark each one complete as you work through the lesson.
Verify CloudTrail is enabled
Check that a multi-region trail exists and is logging to an S3 bucket with log file validation enabled.
aws cloudtrail describe-trails --query "trailList[*].[Name,IsMultiRegionTrail,LogFileValidationEnabled]" --output tableEnable GuardDuty
Enable GuardDuty in your account and region to start automated threat detection.
aws guardduty create-detector --enable --finding-publishing-frequency FIFTEEN_MINUTESCreate a CloudWatch alarm for root login
Alert whenever the root account is used — this should never happen in normal operations.
aws cloudwatch put-metric-alarm --alarm-name RootAccountUsage --metric-name RootAccountUsage --namespace CloudTrailMetrics --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --alarm-actions arn:aws:sns:us-east-1:123456789:SecurityAlertsReview GuardDuty findings
List active GuardDuty findings sorted by severity to prioritize response.
aws guardduty list-findings --detector-id $(aws guardduty list-detectors --query "DetectorIds[0]" --output text) --finding-criteria file://gd-filter.json