Threat Protection and Detection Services
Overview
AWS provides a family of services that protect workloads from attack and detect suspicious activity. A beginner-friendly way to remember them is by what they do: block (Shield, WAF, Network Firewall), scan (Inspector), watch (GuardDuty), investigate (Detective) and centralise (Security Hub).
Think of securing a shop. A strong door and guard dogs block attackers (Shield and WAF), a regular safety inspector checks for weak locks (Inspector), a camera with intelligent alerts spots odd behaviour (GuardDuty), a detective reconstructs what happened (Detective), and a control room collects all alarms in one place (Security Hub).
The exam commonly gives a one-line need and asks you to choose the right service, so focus on the one-sentence purpose of each.
Key Concepts
- AWS Shield protects against DDoS attacks: Standard is automatic and free; Advanced adds enhanced protection, response team and cost protection.
- AWS WAF is a web application firewall that filters HTTP(S) requests with rules (SQL injection, XSS, rate limiting) on CloudFront, ALB, API Gateway and more.
- Amazon GuardDuty is intelligent threat detection that analyses CloudTrail, VPC Flow Logs and DNS logs - with no agents to install.
- Amazon Inspector automatically scans for vulnerabilities in EC2 instances, container images in ECR and Lambda functions.
- Amazon Detective helps investigate the root cause of findings by visualising related activity.
- AWS Security Hub aggregates findings from many services into one dashboard and checks against security standards.
- AWS Network Firewall is a managed network-level firewall for VPCs; security groups and NACLs are the basic network controls.
- AWS Firewall Manager applies WAF, Shield and firewall rules centrally across accounts.
Detailed Notes
Who does what
| Service | Category | One-line purpose |
|---|---|---|
| Shield Standard | Protect | Free, automatic DDoS protection for layers 3 and 4 |
| Shield Advanced | Protect | Enhanced DDoS protection, 24/7 Shield Response Team, cost protection |
| WAF | Protect | Filter web requests (layer 7) by rules |
| Network Firewall | Protect | Stateful network filtering for VPC traffic |
| GuardDuty | Detect | Threat detection from logs using ML and threat intelligence |
| Inspector | Detect | Vulnerability scanning of EC2, ECR images and Lambda |
| Macie | Detect | Sensitive data discovery in S3 |
| Detective | Investigate | Root-cause analysis of findings |
| Security Hub | Centralise | Aggregate findings and security standard checks |
DDoS and web protection
A DDoS attack floods a target to make it unavailable. Shield Standard is on automatically for all AWS customers. When combined with CloudFront and Route 53 the attack is absorbed at the edge. WAF works at the application layer: it can block SQL injection, cross-site scripting, bad IP addresses or requests exceeding a rate limit.
{
"Name": "RateLimitPerIP",
"Priority": 1,
"Statement": { "RateBasedStatement": { "Limit": 2000, "AggregateKeyType": "IP" } },
"Action": { "Block": {} },
"VisibilityConfig": { "SampledRequestsEnabled": true, "CloudWatchMetricsEnabled": true, "MetricName": "RateLimitPerIP" }
}
Detection services
GuardDuty
Enable it with one click per Region and it begins analysing data sources such as CloudTrail events, VPC Flow Logs and DNS logs. It reports findings like "EC2 instance communicating with a known malicious IP". It does not block traffic itself; findings can trigger Lambda or EventBridge automation.
Inspector
Inspector continuously scans for software vulnerabilities (CVEs) and unintended network exposure, scoring risk. It needs the Systems Manager agent for EC2 scanning.
Detective and Security Hub
Detective builds a graph of relationships to speed up investigations. Security Hub gives a single dashboard for findings from GuardDuty, Inspector, Macie and partners, and checks configuration against standards such as the AWS Foundational Security Best Practices and CIS benchmarks.
Basic network defences
| Control | Level | Stateful? |
|---|---|---|
| Security group | Instance / ENI | Yes, allow rules only |
| Network ACL | Subnet | No, allow and deny rules |
Enabling GuardDuty
aws guardduty create-detector --enable
aws guardduty list-findings --detector-id <DETECTOR_ID>
Protecting at the network and application edge
| Layer | Service | Notes |
|---|---|---|
| Network and application | AWS Firewall Manager | Central management of WAF, Shield Advanced, security groups and Network Firewall rules across an Organization |
| VPC traffic filtering | AWS Network Firewall | Managed stateful firewall and intrusion prevention for VPCs |
| Web requests | AWS WAF | Layer 7 rules for SQL injection, XSS, rate limits |
| DDoS | Shield Standard (free) and Advanced | Advanced adds 24/7 response team and cost protection |
Remember the verbs
Shield/WAF block. Inspector scans. GuardDuty detects. Macie discovers sensitive data. Detective investigates. Security Hub centralises. Most exam questions reduce to matching one of these verbs.
Real World Example
An online store is hit by a bot flood and attempted SQL injection. Behind CloudFront, Shield Standard absorbs the volumetric traffic, and a WAF web ACL blocks SQL-injection patterns and rate-limits aggressive IPs.
Meanwhile GuardDuty raises a finding about an EC2 instance contacting a crypto-mining domain; Inspector reveals an unpatched package on that instance. The security team uses Detective to trace the intrusion and Security Hub to track remediation in one place.
Architecture Diagram
- 1Shield absorbs volumetric DDoS attacks before they reach your application.
- 2WAF inspects web requests and blocks malicious patterns.
- 3Security groups allow only the needed traffic to instances.
- 4GuardDuty and Inspector continuously detect threats and vulnerabilities.
Best Practices
- ✓Front internet-facing apps with CloudFront and WAF; they provide edge protection with Shield Standard.
- ✓Enable GuardDuty in every Region and account, ideally centrally via Organizations.
- ✓Run Inspector continuously and patch findings by priority.
- ✓Send findings to Security Hub and automate responses with EventBridge and Lambda.
- ✓Apply least-privilege security groups; never open management ports to 0.0.0.0/0.
Common Interview Questions
Exam Tips
CLF-C02 focus
- "DDoS" = Shield; "SQL injection / XSS" = WAF.
- "Threat detection using CloudTrail, VPC Flow Logs and DNS logs" = GuardDuty.
- "Vulnerability scanning of EC2 / containers / Lambda" = Inspector.
- "Single pane of glass for security findings" = Security Hub.
Finished this lesson?
0 of 43 lessons done · 0% of the course

