Detecting Threats and Vulnerabilities with GuardDuty and Inspector
This lesson explains how Amazon GuardDuty detects active threats and Amazon Inspector finds exploitable vulnerabilities, and how operations teams route and remediate their findings.
Learning outcomes
After completing this lesson, you will be able to:
- Describe GuardDuty data sources and protection plans.
- Describe what Inspector scans.
- Choose remediation for common findings.
Amazon GuardDuty
Amazon GuardDuty continuously analyses CloudTrail management events, VPC Flow Logs and Route 53 Resolver DNS logs, without you enabling those logs, using threat intelligence and machine learning. Protection plans add S3 data events, EKS audit logs, runtime monitoring for EC2, ECS and EKS, malware scanning of EBS volumes and S3 uploads, RDS login activity and Lambda network activity. Extended Threat Detection correlates related signals into attack sequence findings. Findings have a type such as CryptoCurrency:EC2/BitcoinTool.B, UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS or Recon:EC2/PortProbeUnprotectedPort, and a severity. A delegated administrator enables GuardDuty in all accounts and Regions with auto-enable; trusted IP lists, threat lists and suppression rules tune results.
GuardDuty
Amazon Inspector
Amazon Inspector continuously scans EC2 instances (with the SSM Agent, or agentless using EBS snapshots), ECR container images on push and continuously, and Lambda functions and their code for software vulnerabilities (CVEs), and reports network reachability findings for instances exposed through open paths. Each finding has an Inspector score that adjusts the CVSS score for the environment, for example lowering it when the port is not reachable. Findings are rescanned automatically when new CVEs are published or software changes. Inspector can export a software bill of materials (SBOM), and Inspector Classic, which used assessment templates, has reached end of support.
Remediating findings
Remediation depends on the finding. The following table lists common cases.
| Finding | Remediation |
|---|---|
| GuardDuty: instance mining cryptocurrency or contacting command-and-control | Isolate the instance (isolation security group), snapshot for forensics, replace from a clean AMI |
| GuardDuty: instance credentials used outside AWS | Revoke the role's active sessions, require IMDSv2, investigate the instance |
| GuardDuty: unusual S3 access | Review CloudTrail data events, restrict the bucket policy, rotate credentials |
| Inspector: critical CVE on EC2 | Patch with Patch Manager or rebuild the AMI with Image Builder |
| Inspector: vulnerable package in a container image | Rebuild the image on a patched base and redeploy |
| Inspector: network reachability to port 22 from the internet | Restrict the security group; use Session Manager |
The following diagram shows the remediation for three of the findings in the table.

Which service found it?
Automatic patching from Inspector
Inspector reports critical OS vulnerabilities on 80 EC2 instances across accounts. An EventBridge rule on Inspector findings with severity CRITICAL and resource type AWS_EC2_INSTANCE adds the instance ID to a queue; a nightly maintenance window runs AWS-RunPatchBaseline with Install on the listed instances. Inspector rescans after the software inventory changes and closes the findings. Instances in Auto Scaling groups are instead refreshed with the latest Image Builder AMI, because patching them in place would be lost when they are replaced.
Does GuardDuty block malicious traffic?
Show answer
No. It detects threats; responses are automated with EventBridge.
Exam Tips
Remember for the exam
- GuardDuty analyses CloudTrail, VPC Flow Logs and DNS logs without you enabling them.
- GuardDuty detects; it does not block. Automate responses with EventBridge.
- Inspector scans EC2, ECR images and Lambda continuously and reports network reachability.
- Patch EC2 findings with Patch Manager; fix immutable instances by rebuilding AMIs.
- Suppression rules archive expected GuardDuty findings.