Sub topic 3
Protection plans: S3, EKS, Malware, RDS, Lambda, and Runtime Monitoring
This chapter assumes you can read the JSON that the AWS CLI returns. It also assumes you know what a detector is and how GuardDuty uses its foundational data sources (CloudTrail management events, VPC Flow Logs, and DNS logs). Protection plans are optional features that add more data sources or more detection logic. Each one is billed separately, so you turn on only the ones that match your workloads.
What each plan adds
| Plan | Extra data it analyzes | Typical threats |
|---|---|---|
| S3 Protection | CloudTrail S3 data events (object-level API calls) | Unusual access, data exfiltration, disabled bucket protections |
| EKS Protection | Kubernetes audit logs from EKS clusters | Anonymous access, privileged containers, suspicious API calls |
| Runtime Monitoring | OS, file, process, and network events from a GuardDuty security agent | Crypto mining, reverse shells, container escape attempts |
| Malware Protection for EC2 | Snapshots of EBS volumes, scanned when a finding triggers a scan | Malware on an instance that already looks suspicious |
| Malware Protection for S3 | Objects newly uploaded to a bucket you select | Malware in uploaded files |
| RDS Protection | Login activity on supported RDS and Aurora databases | Brute force, logins from anomalous locations |
| Lambda Protection | Network activity from Lambda functions | Communication with known malicious hosts |
How the plans relate to the detector
Most plans are features of a detector. You switch them on or off with the detector. Malware Protection for S3 is the exception. It is a separate resource tied to one bucket, and it has its own IAM role and its own scan results.
Turning plans on
Use update-detector with a --features list. Each entry names a feature and sets its status.
DETECTOR_ID=$(aws guardduty list-detectors --query 'DetectorIds[0]' --output text)
aws guardduty update-detector --detector-id "$DETECTOR_ID" --features '[
{"Name":"S3_DATA_EVENTS","Status":"ENABLED"},
{"Name":"EKS_AUDIT_LOGS","Status":"ENABLED"},
{"Name":"EBS_MALWARE_PROTECTION","Status":"ENABLED"},
{"Name":"RDS_LOGIN_EVENTS","Status":"ENABLED"},
{"Name":"LAMBDA_NETWORK_LOGS","Status":"ENABLED"}
]'
aws guardduty get-detector --detector-id "$DETECTOR_ID" --query 'Features[].[Name,Status]' --output tableThe get-detector call confirms the result. Run it first on an existing account. Some plans may already be on, depending on how and when the detector was created.
Runtime Monitoring is also set with --features. It takes an additional setting that decides whether GuardDuty manages the agent for you on EKS, ECS Fargate, or EC2.
Choosing plans
- Match plans to workloads. Enable EKS Protection and Runtime Monitoring only where you run containers. Enable RDS Protection only where you use supported databases.
- Start with what costs the least to explain. S3 Protection is a common first choice because buckets hold your data and the finding types are easy to read.
- Treat Runtime Monitoring as a rollout. It needs an agent on each resource. Check that the agent is running and that its coverage status is healthy. A resource without a working agent produces no runtime findings.
- Plan for scan costs. Malware scans are charged per gigabyte scanned. Scanning a large bucket with many uploads costs more than scanning a small one.
Verifying a plan works
Sample findings are a quick check. They show that the finding types for a plan appear in your account and reach downstream tools. They do not prove that the plan is collecting real data. For that, check the feature status with get-detector. For Runtime Monitoring, also check agent coverage.
Exercise
Your team runs only Lambda functions and an Aurora database, with no containers. Which protection plans fit this workload, and which can you leave off?
Show answer
Enable Lambda Protection (network activity from functions) and RDS Protection (login activity on the database). Leave EKS Protection and Runtime Monitoring off, because there are no EKS clusters or container hosts to monitor. Enable S3 Protection too if the application uses S3 buckets that hold data.