Threat Detection and Protection Operations: GuardDuty, Inspector, Security Hub, Macie, WAF, Shield and Firewall Manager

AWS SysOps Associate 60 min min read Updated: Nov 17, 2026 Advanced
Threat Detection and Protection Operations: GuardDuty, Inspector, Security Hub, Macie, WAF, Shield and Firewall Manager
Advanced Topic 3 of 4

The Security Service Map

ServiceJob
GuardDutyThreat detection from logs (CloudTrail, VPC Flow, DNS, S3, EKS, RDS, Lambda, malware scanning)
InspectorVulnerability scanning of EC2, ECR images and Lambda functions
MacieFinds sensitive data (PII, secrets) in S3
Security HubCentral view of findings and security standards checks (CSPM) across accounts
DetectiveInvestigate findings with behavior graphs
WAFLayer 7 web firewall
ShieldDDoS protection
Network FirewallManaged stateful network firewall in the VPC
Firewall ManagerApply WAF, Shield Advanced, security group and Network Firewall policies across the organization
Config, CloudTrail, Access AnalyzerCompliance, audit, external access

Amazon GuardDuty

  • Enable in all Regions and accounts (use a delegated administrator and auto-enable for the organization). It reads CloudTrail management and S3 data events, VPC Flow Logs, DNS logs and more without you enabling those logs
  • Protection plans: S3, EKS audit logs and runtime, Malware Protection (EBS scans), RDS login activity, Lambda network activity, runtime monitoring for EC2/ECS
  • Findings have severity (Low, Medium, High, Critical) and type names like UnauthorizedAccess:EC2/SSHBruteForce, Recon:EC2/PortProbeUnprotectedPort, CryptoCurrency:EC2/BitcoinTool.B!DNS, Backdoor:EC2/C&CActivity.B, Policy:S3/BucketBlockPublicAccessDisabled, UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS
  • Route findings with EventBridge to SNS, Lambda or SSM Automation. Use suppression rules for known benign findings and trusted/threat IP lists
bash aws guardduty list-detectors aws guardduty list-findings --detector-id <id> --finding-criteria '{"Criterion":{"severity":{"Gte":7}}}' aws guardduty get-findings --detector-id <id> --finding-ids <fid> --query 'Findings[].[Type,Title,Severity]'

Amazon Inspector

  • Continuous, automated scanning for software vulnerabilities (CVEs) and unintended network exposure on EC2 instances (agentless scan or SSM agent), ECR images, and Lambda functions
  • Needs SSM Agent for the agent-based EC2 scan. Findings include a risk score based on CVSS and exploitability, with remediation advice
  • Use the SBOM export, suppression rules, and send findings to Security Hub and EventBridge
  • Fix by patching (Patch Manager) or rebuilding images, and track coverage (unmanaged instances show as not scanned)

Amazon Macie and Security Hub

  • Macie scans S3 buckets with managed and custom data identifiers and reports findings (sensitive data, public or unencrypted buckets). Use sensitive data discovery jobs and automated discovery
  • Security Hub CSPM runs controls for AWS Foundational Security Best Practices, CIS, PCI DSS, NIST 800-53 using Config rules and shows a security score
  • Aggregates findings from GuardDuty, Inspector, Macie, Config, IAM Access Analyzer, Firewall Manager and partners in ASFF/OCSF format. Cross-Region aggregation and delegated admin for the organization
  • Automation rules and EventBridge custom actions can update findings, suppress or trigger remediation

AWS WAF

ConceptMeaning
Web ACLSet of rules attached to CloudFront, ALB, API Gateway, AppSync, Cognito user pool, App Runner (regional resources in their Region, CloudFront global in us-east-1)
Rule typesIP set match, geo match, string/regex match, size, SQLi/XSS match, rate-based (requests per 5-minute window per IP, with scope-down), labels
Managed rule groupsAWS managed (Core rule set, Known bad inputs, SQL database, Admin protection, IP reputation, Bot Control, Account takeover prevention) and marketplace groups
ActionsAllow, Block, Count, CAPTCHA, Challenge. Start new rules in Count mode to test false positives
Capacity (WCU)Each rule consumes web ACL capacity units (limit 5000 default)
LoggingFull logs to S3, CloudWatch Logs, Firehose. Sampled requests in console. Metrics per rule
bash aws wafv2 list-web-acls --scope REGIONAL aws wafv2 get-sampled-requests --web-acl-arn $ACL --rule-metric-name RateLimit --scope REGIONAL --time-window StartTime=2026-11-17T08:00:00Z,EndTime=2026-11-17T09:00:00Z --max-items 20 aws wafv2 associate-web-acl --web-acl-arn $ACL --resource-arn $ALB_ARN
WAF issueFix
Legitimate users blocked (403)Check sampled requests and logs for the rule, switch it to Count, add exceptions or scope-down
Rate rule ineffective behind a proxy/CDNUse X-Forwarded-For aggregation (forwarded IP configuration)
Cannot attach to NLB or EC2 directlyPut an ALB or CloudFront in front
Large body not inspectedBody inspection has size limits per resource

AWS Shield and Network Firewall

ServiceNotes
Shield StandardAutomatic, free layer 3/4 DDoS protection for all AWS customers
Shield AdvancedPaid. Enhanced detection, 24/7 DDoS Response Team, cost protection for scaling during attacks, advanced metrics, automatic application-layer mitigation with WAF, covers CloudFront, Route 53, ELB, Elastic IP, Global Accelerator
AWS Network FirewallStateful and stateless rules, Suricata-compatible IPS rules, domain filtering, deployed in firewall subnets in a central inspection VPC. Logs to S3/CloudWatch/Firehose
Security groups + NACLsAlways the first layer
  • DDoS resilience pattern: CloudFront + WAF + Shield + Route 53 + Auto Scaling, hide origins, use rate limiting, scale out, and keep application stateless

AWS Firewall Manager

  • Requires Organizations and a Firewall Manager administrator account (and Config enabled)
  • Define policies once (WAF rules, Shield Advanced, security group audit/usage policies, Network Firewall, Route 53 DNS Firewall) that apply to new and existing resources across accounts by tag or resource type, with auto-remediation

Incident Response Flow

text 1. DETECT GuardDuty finding: UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration 2. TRIAGE Severity, affected role/instance, time. Use Detective and CloudTrail to see actions taken 3. CONTAIN Attach a quarantine security group (deny all), remove instance profile or add inline Deny policy to the role session (revoke older sessions), disable access keys, block IPs in WAF/NACL 4. PRESERVE Snapshot EBS volumes, memory capture if needed, keep CloudTrail/Flow logs, tag as evidence 5. ERADICATE Rebuild from a clean AMI, rotate credentials and secrets, patch the vulnerability 6. RECOVER Return to service, verify, increase monitoring 7. LEARN Post-incident review, update runbooks, detections and guardrails
bash # Contain a compromised instance: replace its security groups with an isolating one aws ec2 modify-instance-attribute --instance-id i-0abc --groups sg-quarantine aws ec2 create-snapshot --volume-id vol-0abc --description "evidence IR-2026-11-17" # Revoke existing role sessions: add an inline policy denying tokens issued before now aws iam put-role-policy --role-name AppRole --policy-name RevokeOldSessions --policy-document file://revoke.jso

Practice Tasks

  1. Enable GuardDuty and generate sample findings, then route high severity ones to SNS
  2. Run Inspector on an instance and patch one finding with Patch Manager
  3. Attach a WAF with the Core rule set (Count first) and a rate-based rule to an ALB
  4. Enable Security Hub with the AWS Foundational standard and read the failed controls
  5. Write and rehearse a containment runbook for a compromised instance

Conclusion

Enable GuardDuty, Inspector, Macie and Security Hub organization-wide, route findings to EventBridge and automation, protect web apps with WAF (start with Count mode), rely on Shield and CloudFront for DDoS, centralize policy with Firewall Manager, and follow a rehearsed response flow: detect, contain, preserve, eradicate, recover, learn.

Quick Summary: service map; GuardDuty; Inspector; Macie and Hub; WAF; Shield and Firewall; Firewall Manager; incident flow.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators