Detecting Threats with Amazon GuardDuty
This lesson explains how GuardDuty, a managed threat detection service, continuously analyses account activity and network logs to find malicious or unauthorised behaviour, with no agents to deploy.
Learning outcomes
After completing this lesson, you will be able to:
- Identify what GuardDuty analyses.
- Explain how EventBridge automates responses to findings.
- Describe organisation-wide GuardDuty coverage.
What GuardDuty analyses
GuardDuty detects threats by continuously analysing activity in an account with threat intelligence and machine learning. From CloudTrail management events, it detects unusual API activity, such as calls from a known malicious IP address or an attempt to disable logging. From VPC Flow Logs and DNS logs, it detects network threats, such as an instance mining cryptocurrency, communicating with a command-and-control server or scanning ports.
With S3 Protection, it analyses S3 data events for suspicious access patterns that suggest data exfiltration. Optional protection plans extend coverage to EKS audit logs, runtime monitoring of processes on EC2, ECS and EKS, RDS login activity, Lambda network activity, and malware scanning of EBS volumes and new S3 objects. The following table summarises the sources.
| Source | Examples of findings |
|---|---|
| CloudTrail management events | Unusual API calls, disabled logging, calls from malicious IPs |
| VPC Flow Logs and DNS logs | Crypto mining, communication with command-and-control servers, port scanning |
| S3 data events (S3 Protection) | Suspicious access patterns and data exfiltration |
| Optional protection plans | EKS audit logs, runtime monitoring for EC2, ECS and EKS, RDS login activity, Lambda network activity, malware scanning of EBS volumes and S3 uploads |
GuardDuty reads these sources directly from AWS, so enabling it changes nothing in your own logging and has no performance impact. Findings carry a severity and are retained for 90 days.
GuardDuty facts
Automated response
GuardDuty findings are most valuable when they trigger a response within minutes, and Amazon EventBridge makes that automatic. Each finding is published as an event, and an EventBridge rule matching findings of a given type or severity starts a response.
The response is usually performed by a Lambda function or a Step Functions workflow: isolating a compromised instance by changing its security group, revoking a role's active sessions, or blocking an attacker's IP address in a network ACL or AWS WAF. At the same time, Amazon SNS notifies the security team, who investigate and complete the remediation.
The following diagram shows the automated response described above.

Responding to a finding
Organisation-wide coverage
Use a delegated administrator with auto-enable for new accounts, so coverage does not depend on each team. Trusted IP lists and suppression rules reduce noise from known activity.
Responding to a compromised instance automatically
A security team wants compromised EC2 instances isolated within minutes, without waiting for a person.
| Step | Service |
|---|---|
| Detect communication with a known malicious IP | Amazon GuardDuty finding |
| Match high-severity EC2 findings | Amazon EventBridge rule |
| Replace the instance's security groups with an isolation group and snapshot its volumes | Lambda function or Systems Manager Automation |
| Notify the team | Amazon SNS |
| Investigate what else the attacker did | Amazon Detective |
| Find the vulnerability that let them in | Amazon Inspector findings for the instance |
GuardDuty detects but never blocks; EventBridge and automation provide the response. Enabling GuardDuty organisation-wide from a delegated administrator ensures every account is covered.
Which data sources does GuardDuty analyse without any agents?
Show answer
CloudTrail management events, VPC Flow Logs and DNS query logs, plus optional sources such as S3 data events and EKS audit logs, which it reads directly from AWS.
Exam Tips
Remember for the exam
- To detect compromised instances or malicious activity with no agents, use GuardDuty.
- To isolate a compromised instance automatically, route the GuardDuty finding through EventBridge to a Lambda function that changes the security group.
- To enable threat detection in every current and future account, use a delegated administrator with auto-enable.
- To scan uploaded S3 objects for malware, use GuardDuty Malware Protection for S3.