Skip to main content
Latest Documentation
This is the latest documentation for the Cloud Posse Reference Architecture. To determine which version you're currently using, please see Version Identification.

AWS GuardDuty

AWS GuardDuty is a managed threat detection service that continuously monitors for malicious activity and unauthorized behavior across your AWS accounts using ML-based analysis.

Overview

GuardDuty provides:

  • Threat Detection: ML-based analysis of CloudTrail, VPC Flow Logs, and DNS logs
  • Threat Intelligence: Integration with AWS and partner threat intelligence feeds
  • Real-time Alerts: Notifications through CloudWatch Events and SNS
  • Multi-account Support: Centralized management across your organization
  • Protection Features: S3, EKS, Lambda, Malware, and Runtime monitoring

Supported Protection Features

FeatureDescription
S3 ProtectionMonitors S3 data events for suspicious activities
EKS Audit Log MonitoringAnalyzes Kubernetes audit logs from EKS clusters
Malware ProtectionScans EBS volumes for malware
Lambda ProtectionMonitors Lambda function network activity
Runtime MonitoringRuntime threat detection for EC2, ECS, and EKS with automatic agent management

Architecture

Deployment

GuardDuty uses a 3-step delegated administrator deployment model.

Prerequisites

  • Enable GuardDuty trusted access in AWS Organizations by adding guardduty.amazonaws.com to aws_service_access_principals in your account component

Or enable via AWS CLI:

aws organizations enable-aws-service-access --service-principal guardduty.amazonaws.com

Step 1: Deploy to Delegated Administrator Account

# core-ue1-security
components:
terraform:
aws-guardduty/delegated-administrator:
metadata:
component: guardduty
vars:
enabled: true
delegated_administrator_account_name: core-security
environment: ue1
region: us-east-1
atmos terraform apply aws-guardduty/delegated-administrator -s core-ue1-security

Step 2: Deploy to Organization Management Account

Root Access Required:

This step requires root account access (such as with the managers profile).

# core-ue1-root
components:
terraform:
aws-guardduty/root:
metadata:
component: guardduty
backend:
s3:
role_arn: null
vars:
enabled: true
delegated_administrator_account_name: core-security
environment: ue1
region: us-east-1
privileged: true
atmos terraform apply aws-guardduty/root -s core-ue1-root

Step 3: Deploy Organization Settings

# core-ue1-security
components:
terraform:
aws-guardduty/org-settings:
metadata:
component: guardduty
vars:
enabled: true
delegated_administrator_account_name: core-security
environment: ue1
region: us-east-1
admin_delegated: true
# Protection features
s3_protection_enabled: true
kubernetes_audit_logs_enabled: true
malware_protection_scan_ec2_ebs_volumes_enabled: true
lambda_network_logs_enabled: true
# Runtime Monitoring
runtime_monitoring_enabled: true
runtime_monitoring_additional_config:
eks_addon_management_enabled: true
ecs_fargate_agent_management_enabled: true
ec2_agent_management_enabled: true
atmos terraform apply aws-guardduty/org-settings -s core-ue1-security

Multi-Region Deployment

Repeat all 3 steps for each region:

# us-east-1
atmos terraform apply aws-guardduty/delegated-administrator -s core-ue1-security
atmos terraform apply aws-guardduty/root -s core-ue1-root
atmos terraform apply aws-guardduty/org-settings -s core-ue1-security

# us-west-2
atmos terraform apply aws-guardduty/delegated-administrator -s core-uw2-security
atmos terraform apply aws-guardduty/root -s core-uw2-root
atmos terraform apply aws-guardduty/org-settings -s core-uw2-security

SNS Notifications

Enable SNS notifications for GuardDuty findings:

components:
terraform:
aws-guardduty/delegated-administrator:
vars:
enabled: true
create_sns_topic: true
cloudwatch_enabled: true

This creates:

  • KMS key with permissions for EventBridge, SNS, and SQS
  • Encrypted SNS topic for findings
  • SQS queue subscribed to the SNS topic
  • CloudWatch Event Rules to route findings

Key Variables

VariableDescriptionDefault
admin_delegatedSet to true after delegation is completefalse
auto_enable_organization_membersAuto-enroll members (ALL, NEW, NONE)NEW
s3_protection_enabledEnable S3 data event monitoringtrue
kubernetes_audit_logs_enabledEnable EKS audit log monitoringfalse
malware_protection_scan_ec2_ebs_volumes_enabledEnable EBS malware scanningfalse
lambda_network_logs_enabledEnable Lambda network monitoringfalse
runtime_monitoring_enabledEnable runtime monitoringfalse

See Also

References