Skip to Content

GuardDuty, Inspector and Macie

Amazon GuardDuty for intelligent threat detection, Amazon Inspector for automated vulnerability scanning of EC2, container images and Lambda, and Amazon Macie for finding sensitive data in S3.

Amazon GuardDuty

Amazon GuardDuty: it analyses CloudTrail events, VPC Flow Logs and DNS logs, plus optional sources such as S3 data events, EKS and runtime monitoring, malware scans, RDS logins and Lambda network activity; its findings go to EventBridge, whose rules alert through SNS or run Lambda to isolate a resource Amazon GuardDuty: it analyses CloudTrail events, VPC Flow Logs and DNS logs, plus optional sources such as S3 data events, EKS and runtime monitoring, malware scans, RDS logins and Lambda network activity; its findings go to EventBridge, whose rules alert through SNS or run Lambda to isolate a resource

Threat detection from logs that already exist.

Amazon GuardDuty is intelligent threat discovery to protect an AWS account.

  • Uses machine learning algorithms, anomaly detection and third-party threat intelligence.
  • One click to enable (30-day trial), no need to install software.
  • Input data includes:
    • CloudTrail event logs: unusual API calls, unauthorized deployments;
      • CloudTrail management events: create VPC subnet, create trail…
      • CloudTrail S3 data events: get object, list objects, delete object…
    • VPC Flow Logs: unusual internal traffic, unusual IP addresses;
    • DNS logs: compromised EC2 instances sending encoded data within DNS queries;
    • optional features: EKS audit logs, runtime monitoring, RDS and Aurora login activity, EBS and S3 malware scans, Lambda network activity, S3 data events…
  • Flow Logs and DNS logging do not need to be turned on separately: GuardDuty reads the foundational sources directly.
  • Set up EventBridge rules to be notified of findings; the rules can target Lambda or SNS.
  • Can protect against cryptocurrency attacks (it has a dedicated finding for crypto mining).

GuardDuty also has Extended Threat Detection (free, on by default), which links separate events into one attack sequence finding.

Amazon Inspector

Amazon Inspector: it continuously scans EC2 instances, container images in ECR and Lambda functions for known vulnerabilities (CVEs) and network exposure, scores the risk, and sends findings to Security Hub and EventBridge Amazon Inspector: it continuously scans EC2 instances, container images in ECR and Lambda functions for known vulnerabilities (CVEs) and network exposure, scores the risk, and sends findings to Security Hub and EventBridge

Vulnerability scanning for EC2, images and functions.

Amazon Inspector runs automated security assessments.

  • For EC2 instances:
    • uses the Systems Manager (SSM) agent (or an agentless scan of the volumes);
    • analyzes against unintended network accessibility;
    • analyzes the running OS against known vulnerabilities.
  • For container images pushed to Amazon ECR: assesses images as they're pushed.
  • For Lambda functions:
    • identifies software vulnerabilities in function code and package dependencies;
    • assesses functions as they're deployed.
  • Reporting and integration with AWS Security Hub; sends findings to EventBridge.

What does Inspector evaluate?

  • Remember: only EC2 instances, container images and Lambda functions.
  • Continuous scanning of the infrastructure, only when needed (new package, new CVE…).
  • Package vulnerabilities (EC2, ECR and Lambda), against a database of CVEs.
  • Network reachability (EC2).
  • A risk score is associated with every vulnerability, for prioritization.

Amazon Macie

Amazon Macie: it analyses objects in S3 buckets with machine learning and pattern matching to find sensitive data such as PII, and sends findings to EventBridge, which can alert through SNS or fix the problem with Lambda Amazon Macie: it analyses objects in S3 buckets with machine learning and pattern matching to find sensitive data such as PII, and sends findings to EventBridge, which can alert through SNS or fix the problem with Lambda

Find personal data hiding in S3.

Amazon Macie is a fully managed data security and data privacy service that uses machine learning and pattern matching to discover and protect sensitive data in AWS.

  • Macie helps identify and alert on sensitive data, such as personally identifiable information (PII): names, credit card numbers, passport numbers…
  • It works on S3: an inventory of the account's buckets, their security (public access, encryption), and automated discovery of sensitive data in objects.
  • Findings go to EventBridge (and Security Hub) for integrations.

Real-world examples

  • GuardDuty raises a CryptoCurrency:EC2/BitcoinTool finding for an instance a developer left open; an EventBridge rule runs a Lambda function that isolates it with a quarantine security group.
  • Inspector flags a critical CVE in a container image just pushed to ECR, and the pipeline blocks the deployment.
  • Macie finds a CSV of customer emails and card numbers in a bucket meant for logs.

Exam tips

  • "Detect threats", "compromised instance", "crypto mining", "unusual API calls" → GuardDuty.
  • "Scan EC2, ECR images or Lambda for vulnerabilities (CVEs)" → Inspector.
  • "Find PII or sensitive data in S3" → Macie.
  • "Automate a response to a finding" → EventBridge rule → Lambda or SNS.

Common traps

  • "Inspector scans RDS databases or S3." Only EC2, ECR images and Lambda.
  • "Enable VPC Flow Logs first for GuardDuty." GuardDuty reads the flow and DNS data itself.
  • "Macie scans EBS volumes." Macie is for S3.

Check yourself

GuardDuty and Inspector have free trials, but a meaningful test needs real activity, so instead:

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt