LearningTree · AWS Security

Security Services
WAF · ACM · CloudHSM · Shield · GuardDuty · Inspector · Macie

Seven essential AWS security services that protect your applications at the network, certificate, hardware, DDoS, threat-detection, vulnerability-scanning, and data-discovery layers. One chapter each — what they do, when to use them, how they fit together.

7 Chapters ~18 min read Architecture Overview
01
Chapter One
AWS WAF โ€” Web Application Firewall

AWS WAF is a Layer 7 (HTTP/HTTPS) firewall that filters malicious web traffic before it reaches your application. It protects against SQL injection, cross-site scripting (XSS), bot attacks, and custom-defined threats.

What WAF Protects Core
Where It Sits
In front of CloudFront, ALB, API Gateway, or AppSync. Traffic passes through WAF rules BEFORE reaching your application.
What It Inspects
HTTP headers, body, URI, query strings, IP addresses, geographic origin, rate of requests.
What It Blocks
SQL injection, XSS, known bad IPs, excessive request rates, bot traffic, custom patterns you define.
Core Components Core
ComponentWhat It DoesExample
Web ACLContainer for rules. One Web ACL = one set of protections attached to a resource.prod-web-acl attached to ALB
RuleA single condition + action (Allow, Block, Count, CAPTCHA)Block if request matches SQLi pattern
Rule GroupReusable collection of rulesAWS Managed: AWSManagedRulesCommonRuleSet
Managed RulesPre-built rule sets maintained by AWS or marketplace vendorsOWASP Top 10 protections, Bot Control
Rate-Based RuleBlocks IPs exceeding a request thresholdBlock if >2000 requests in 5 minutes from same IP
WAF Rule Priority — Evaluation Order Core

Rules in a Web ACL are processed in order of priority (lowest number = highest priority). The first rule that matches determines the action — subsequent rules are NOT evaluated.

PriorityRuleActionWhy This Order
0Rate-based rule (2000 req/5min)BlockMust see ALL traffic to count rates
10IP allowlist (office VPN)AllowTrusted IPs skip all blocking rules
20AWSManagedRulesCommonRuleSetBlockOWASP Top 10 protections
30AWSManagedRulesSQLiRuleSetBlockSQL injection patterns
1000Default actionAllowEverything else passes through
Best Practice

Put rate-based rules first (they need to see all traffic to count). Put Allow exceptions (IP allowlists) before blocking rules. Set default action based on your security posture: Allow (permissive) or Block (strict).

Key Architecture Decisions Core

When to Use WAF

  • Public-facing web applications
  • APIs exposed to the internet
  • Need to block specific countries/IPs
  • Compliance requiring web app firewall
  • Bot mitigation (scrapers, credential stuffing)
💰

Pricing Model

  • $5/month per Web ACL
  • $1/month per rule
  • $0.60 per million requests inspected
  • Managed rule groups: $1–$30/month each
  • Bot Control: $10/month + per-request
Quick Start Recommendation

For most web apps: attach WAF to your ALB or CloudFront, enable AWSManagedRulesCommonRuleSet (free with WAF) + AWSManagedRulesSQLiRuleSet + a rate-based rule (2000 req/5min). This covers OWASP Top 10 out of the box.

WAF vs Security Groups vs NACLs

Security Groups/NACLs = Layer 3/4 (IP and port filtering). WAF = Layer 7 (HTTP content inspection). They complement each other — SGs block unwanted ports, WAF blocks malicious HTTP payloads.

WAF — Key Takeaway

WAF is your Layer 7 shield. It inspects HTTP traffic for malicious patterns (SQLi, XSS, bots) and blocks them before they reach your app. Attach to CloudFront or ALB, enable managed rules, add rate limiting. Done.

02
Chapter Two
AWS Certificate Manager (ACM)

ACM provides free public TLS/SSL certificates and automates their lifecycle — provisioning, renewal, and deployment. It solves the operational burden of manually managing certificates for HTTPS.

What ACM Does Core
Free Public Certs
Issue domain-validated (DV) certificates at zero cost. Trusted by all major browsers. Supports wildcard (*.example.com).
Auto-Renewal
Certificates auto-renew 60 days before expiry. No manual intervention. No more expired cert outages.
Integrated Deployment
One-click attachment to ALB, CloudFront, API Gateway, Elastic Beanstalk. No certificate file management.
Validation Methods
DNS validation (recommended — add CNAME, auto-renews forever) or Email validation (requires manual approval each renewal).
Private CA
ACM Private CA issues internal certificates for mTLS, IoT, microservice communication. Costs $400/month per CA.
Where ACM Certificates Work Core
ServiceRegion RequirementNotes
CloudFrontCertificate must be in us-east-1Global distribution, but cert must be in N. Virginia
ALB / NLBSame region as load balancerMost common use case for HTTPS termination
API GatewaySame region (or us-east-1 for edge)Custom domain names with TLS
Elastic BeanstalkSame regionEnvironment HTTPS configuration
EC2 directly✗ NOT supportedCannot export ACM public certs. Use Let's Encrypt or import.
Common Gotcha

ACM public certificates cannot be installed on EC2 instances directly — you cannot export the private key. They only work with integrated services (ALB, CloudFront, API GW). For EC2, use a third-party cert or ACM Private CA.

ACM Private CA — Internal Certificates Deep
AspectACM PublicACM Private CA
CostFree$400/month per CA + $0.75/cert
ValidationDomain (DNS/email)Your approval (you control issuance)
TrustAll browsers (public trust)Only clients you configure
Use caseInternet-facing HTTPSInternal mTLS, IoT, microservices
ExportCannot export private keyCan export private keys
When to Use Private CA

mTLS between microservices, IoT device certificates, internal services needing TLS, Kubernetes cert management, or issuing certs to non-AWS resources. Common pattern: Public ACM for internet TLS + Private CA for internal service mesh authentication.

✅ ACM Best Practices

  • Always use DNS validation (auto-renews)
  • Request wildcard: *.example.com + example.com
  • CloudFront certs MUST be in us-east-1
  • Use ACM for all HTTPS termination (free)
  • Monitor CertificateExpiration CloudWatch metric

❌ Common Mistakes

  • Using email validation (breaks auto-renewal)
  • Forgetting us-east-1 for CloudFront
  • Trying to export public cert to EC2
  • Not adding naked domain (example.com) alongside wildcard
  • Letting Route 53 CNAME records get deleted
ACM — Key Takeaway

ACM = free TLS certificates + automatic renewal + zero-touch deployment to ALB/CloudFront. Always use DNS validation. Remember: CloudFront requires us-east-1, and you cannot export public certs to EC2.

03
Chapter Three
AWS CloudHSM

CloudHSM provides dedicated, single-tenant Hardware Security Modules in the AWS cloud. Unlike KMS (shared, managed HSMs), CloudHSM gives you full control over the hardware and cryptographic operations.

KMS vs CloudHSM Core
AspectAWS KMSAWS CloudHSM
TenancyMulti-tenant (shared HSM fleet)Single-tenant (your dedicated HSMs)
FIPS 140-2Level 2Level 3
ManagementAWS manages everythingYou manage users, keys, operations
AccessAWS APIs (kms:Encrypt, etc.)Industry standard APIs (PKCS#11, JCE, CNG)
Integration100+ AWS services nativelyCustom apps, Oracle TDE, SSL offload
Cost$1/key/month + API calls~$1.50/hour per HSM (~$1,100/month)
HAAutomatic (multi-AZ)You deploy 2+ HSMs across AZs
Key exportKeys never leave KMSYou control keys — can export
When to Use CloudHSM Core
🏢

Use CloudHSM When

  • Regulatory requires FIPS 140-2 Level 3
  • Need single-tenant HSM (no shared hardware)
  • Must use PKCS#11, JCE, or CNG APIs
  • Oracle TDE (Transparent Data Encryption)
  • SSL/TLS offloading at web server level
  • Custom cryptographic operations
🔑

Stick with KMS When

  • Standard AWS service encryption (S3, EBS, RDS)
  • Don't need FIPS Level 3
  • Want managed service (no HSM admin)
  • Cost-sensitive ($1/key vs $1,100/month)
  • Don't need custom crypto APIs
  • 99% of workloads → KMS is sufficient
Architecture Note

CloudHSM clusters live in your VPC. You deploy HSMs across AZs for HA (minimum 2 recommended). KMS can use CloudHSM as a Custom Key Store — giving you KMS API convenience + CloudHSM hardware isolation.

Critical Responsibility

With CloudHSM, you own key management. If you lose your HSM credentials and haven't backed up keys, they are gone forever. AWS cannot recover them. KMS handles this for you automatically.

CloudHSM — Key Takeaway

CloudHSM = dedicated HSM hardware you fully control. Use it only when regulations demand FIPS Level 3 or single-tenant HSMs. For everything else, KMS is simpler, cheaper, and integrated with all AWS services.

04
Chapter Four
AWS Shield — DDoS Protection

AWS Shield protects your applications against Distributed Denial of Service (DDoS) attacks. It comes in two tiers: Standard (free, automatic) and Advanced (paid, with response team and financial protection).

Shield Standard vs Advanced Core
FeatureShield StandardShield Advanced
CostFree (automatic for all AWS accounts)$3,000/month + data transfer fees
ProtectionLayer 3/4 (network/transport)Layer 3/4/7 (+ application layer)
What it coversSYN floods, UDP reflection, amplificationAll Standard + HTTP floods, DNS query floods, sophisticated L7
Response Team✗ No✓ 24/7 Shield Response Team (SRT)
Cost Protection✗ No✓ DDoS cost protection (credits for scaling charges)
VisibilityBasic metricsReal-time attack dashboards, detailed diagnostics
WAF IntegrationSeparate✓ Free WAF for Shield-protected resources
Health Checks✓ Route 53 health-check integration for faster detection
What Shield Advanced Protects Core

Eligible Resources

  • CloudFront distributions
  • Route 53 hosted zones
  • Application Load Balancers
  • Elastic IPs (EC2, NLB)
  • Global Accelerator

What SRT Does

  • Analyzes attack in real-time
  • Creates custom WAF rules
  • Applies mitigations proactively
  • Provides post-attack analysis
  • Available 24/7 via support

Cost Protection

  • DDoS causes scaling → higher bill
  • Shield Advanced provides credits
  • Covers: EC2, ELB, CloudFront, Route 53
  • Must have proper auto-scaling
  • Request within 15 days of attack
Resource Eligibility — What Can Be Protected Core

✓ Eligible for Shield Advanced

  • CloudFront distributions (any region)
  • Route 53 hosted zones
  • Application Load Balancers
  • Network Load Balancers
  • Elastic IP addresses (EC2, NLB)
  • AWS Global Accelerator

✗ NOT Directly Eligible

  • EC2 instances (must use EIP or put behind ALB)
  • API Gateway (only via CloudFront)
  • S3 static websites (only via CloudFront)
  • Lambda function URLs
  • Direct-connect endpoints
Pro Tip

Put your application behind CloudFront even if you don't need caching — it gives you full DDoS protection + Shield Advanced eligibility + WAF attachment point. Cost: $3,000/month covers up to 1,000 protected resources.

WAF vs Shield — Don't Confuse Them Core
AspectWAFShield StandardShield Advanced
What it doesInspects HTTP contentFilters network floodsAll + L7 + response team
Attack typeSQLi, XSS, bots, rate abuseSYN/UDP floods, amplificationAll DDoS types
LayerLayer 7 (HTTP)Layer 3/4 (network)Layers 3/4/7
Cost$5/ACL + usageFree$3,000/month (incl. WAF)

Key insight: They complement each other. Shield Standard blocks volumetric network floods. WAF blocks targeted HTTP attacks. You need both for full protection. Shield Advanced includes WAF at no extra cost.

Architecture Recommendation

For most applications, Shield Standard + CloudFront + WAF rate rules provides excellent DDoS protection at low cost. Shield Advanced is for high-value targets (financial services, gaming, governments) where $3K/month is justified by the 24/7 SRT and cost protection.

Shield Standard is Always On

Every AWS account has Shield Standard automatically — you don't need to enable it. It protects against the most common volumetric attacks (SYN/UDP floods) at the network edge. No additional cost.

Shield — Key Takeaway

Shield Standard = free, automatic Layer 3/4 DDoS protection for all AWS accounts. Shield Advanced = $3K/month for Layer 7 protection, 24/7 response team, cost protection credits, and WAF included. Most apps need Standard + WAF rate rules only.

05
Chapter Five
Amazon GuardDuty — Threat Detection

GuardDuty is an intelligent threat detection service that continuously monitors your AWS accounts for malicious activity and unauthorized behavior. It uses machine learning, anomaly detection, and threat intelligence to identify threats — with zero infrastructure to deploy.

What GuardDuty Monitors Core
Data SourceWhat It AnalyzesThreats Detected
CloudTrail EventsAPI calls across your accountUnusual API patterns, credential compromise, privilege escalation
VPC Flow LogsNetwork traffic metadataCrypto mining, data exfiltration, C2 communication, port scanning
DNS LogsDNS query patternsCommunication with known malicious domains, DNS tunneling
S3 Data EventsS3 API callsUnusual access patterns, public exposure, data theft
EKS Audit LogsKubernetes control planeSuspicious container activity, privilege escalation in k8s
Lambda NetworkLambda invocation patternsMalicious Lambda activity, credential abuse from functions
How GuardDuty Works Core
Enable (One Click)
Turn on in each region. No agents, no software, no log configuration. GuardDuty reads logs independently.
Continuous Analysis
ML models + threat intelligence feeds continuously scan for anomalies. Updates automatically.
Findings
Generates findings with severity (Low/Medium/High), affected resource, and recommended remediation.
Integration
Findings → EventBridge → Lambda/SNS for automated response. Also integrates with Security Hub.
Multi-Account
Delegated administrator model. Central security account aggregates findings from all org accounts.
GuardDuty Pricing — What It Actually Costs Core

GuardDuty pricing is based on volume of data analyzed, NOT on findings generated:

Data SourcePricingTypical Small Account
CloudTrail Events$1.00 per 1M events~$0.50–$2.00/month
VPC Flow Logs$0.10 per GB analyzed~$1.00–$10.00/month
DNS Logs$0.10 per 1M queries~$0.10–$2.00/month
S3 Data Events$0.25 per 1M events~$0 (unless high-volume S3)
EKS Audit Logs$0.10 per 1M events~$0 (unless large cluster)

Typical monthly cost: $5–$20/month for a small-to-medium account. 30-day free trial. No commitment. Well worth the threat detection coverage.

Common Finding Types Core

High Severity

  • EC2 communicating with known C2 server
  • Credentials used from known malicious IP
  • S3 bucket policy made public maliciously
  • Crypto mining detected on EC2

Medium Severity

  • Unusual API calls from an IAM user
  • EC2 port probe from unusual source
  • DNS queries to bitcoin-related domains
  • Unusual instance launch in new region

Low Severity

  • SSH brute force attempt
  • API called from Tor exit node
  • Unusual login time for IAM user
  • DNS query to low-reputation domain
Why Every Account Should Enable It

GuardDuty has zero deployment overhead (no agents, no config), a 30-day free trial, and costs ~$1–4/million events after that. It catches threats that no amount of good IAM policies can prevent (compromised credentials, insider threats, zero-days). Enable it in every region, every account.

Automated Response Pattern Deep

Detection → Response Pipeline

  • GuardDuty generates finding
  • EventBridge rule matches finding type
  • Lambda function triggered automatically
  • Isolates compromised resource (SG change)
  • Sends alert via SNS/PagerDuty

Common Auto-Responses

  • Quarantine EC2 (restrictive SG)
  • Disable compromised IAM credentials
  • Block malicious IP in WAF
  • Snapshot EC2 for forensics
  • Notify security team immediately
GuardDuty — Key Takeaway

GuardDuty = one-click threat detection using ML + threat intel. Zero infrastructure. Monitors CloudTrail, VPC Flow, DNS, S3, EKS. Generates findings you can automate responses for via EventBridge + Lambda. Enable in every account, every region. No reason not to.

06
Chapter Six
AWS Inspector — Automated Vulnerability Assessment

AWS Inspector is a continuous, automated vulnerability assessment service that scans your workloads — EC2 instances, container images in ECR, and Lambda functions — for software vulnerabilities (CVEs) and unintended network exposure.

Inspector v2 (Current)

Inspector v2 (launched 2021) replaced the original Inspector. It provides continuous scanning rather than one-shot assessments, deeper integration with Security Hub and ECR, and supports EC2, Lambda, and container images in a single service.

What Inspector Scans Core
TargetWhat Is CheckedHow It Works
EC2 InstancesOS and application package CVEs, network reachability, open ports exposed to internetSSM Agent (required) delivers findings in real time
ECR Container ImagesOS layer + application library CVEs at image push time and continuouslyAgentless โ€” Inspector integrates with ECR directly
Lambda FunctionsApplication package dependencies (npm, pip, Maven, etc.) for known CVEsAgentless โ€” scans function deployment package
How Inspector Works Core
Enable (One Click)
Enable per account (or via AWS Organizations centrally). EC2 needs SSM Agent; ECR and Lambda are agentless.
Continuous Scanning
Re-scans automatically when new CVEs are published, software packages are updated, or new instances/images are created.
CVE Database
Uses the NVD (National Vulnerability Database) plus additional vendor advisories. Each finding has a CVSS score and severity (Critical / High / Medium / Low / Informational).
Network Reachability
Checks if EC2 ports are accessible from the internet via VPC routing rules, Security Groups, and NACLs. Flags unintended exposure even without a CVE.
Integration
Findings pushed to Security Hub (aggregate view) and EventBridge (automate responses). ECR findings visible in ECR Console directly.
Inspector Finding Types Core
๐Ÿ”ด

Critical / High CVE

  • CVSS score 7.0โ€“10.0
  • Remote code execution vulnerabilities
  • Privilege escalation exploits
  • Patch or replace immediately
๐ŸŸก

Network Reachability

  • Port exposed to 0.0.0.0/0 or ::/0
  • No patching needed โ€” fix Security Groups
  • Common: port 22 (SSH) or 3389 (RDP) open
  • Inspector maps the full VPC path
๐Ÿ”ต

Software Vulnerabilities

  • OS packages (yum, apt) with known CVEs
  • App libraries (log4j, openssl, etc.)
  • Container image layer vulnerabilities
  • Lambda dependency CVEs
Inspector Pricing Core
Resource TypePricingNotes
EC2 Instances~$0.11 per instance/monthRequires SSM Agent; prorated by hours running
ECR Container Images~$0.09 per image re-scan/monthInitial push scan free; continuous re-scanning billed
Lambda Functions~$0.30 per function/monthPer function, not per invocation

Typical cost: Small account with 10 EC2 instances + 20 ECR images + 5 Lambda functions โ‰ˆ $5–$10/month. 15-day free trial on first enable.

Inspector vs GuardDuty — Key Distinction Core
AspectInspectorGuardDuty
What it findsVulnerabilities before exploitation (CVEs, misconfigs)Active threats during or after exploitation
When to useShift-left security โ€” find issues before attackers doRuntime detection โ€” catch what slips through
Data sourcePackage metadata, CVE databases, network configCloudTrail, VPC Flow Logs, DNS, runtime logs
ActionPatch / update / fix SGsQuarantine / alert / investigate
AnalogyPre-flight safety checkBlack box recorder + mid-flight alert
Best Practice

Use Inspector and GuardDuty together: Inspector prevents exploitation by finding CVEs early (shift-left); GuardDuty detects exploitation attempts at runtime. They are complementary, not competing.

Inspector — Key Takeaway

AWS Inspector = continuous automated CVE scanning for EC2, ECR, and Lambda. Enable it to find vulnerabilities before attackers do. Zero infrastructure for ECR and Lambda; SSM Agent required for EC2. Costs ~$5–$10/month for a typical account. Always pair with GuardDuty for runtime detection.

07
Chapter Seven
AWS Macie — Sensitive Data Discovery in S3

AWS Macie is a fully managed data security service that uses machine learning to automatically discover, classify, and protect sensitive data stored in Amazon S3. It identifies personally identifiable information (PII), financial data, credentials, and other sensitive content โ€” and alerts when S3 buckets are at risk of unintended exposure.

What Macie Discovers Core
๐Ÿ”

Sensitive Data Types (Managed)

  • PII: names, addresses, SSNs, passport numbers
  • Financial: credit card numbers, bank account numbers
  • Medical: health record identifiers (PHI/HIPAA)
  • Credentials: AWS IAM access keys, private keys, passwords in files
  • Network: IP addresses, MAC addresses
โš™๏ธ

Custom Data Identifiers

  • Define your own regex patterns
  • Match employee IDs, internal project codes, proprietary formats
  • Add keywords to reduce false positives
  • Combine with managed types in the same job
How Macie Works Core
Scope
Macie works exclusively with Amazon S3. It does not scan EBS, EFS, databases, or other storage. Plan accordingly.
S3 Inventory
Macie continuously evaluates all S3 buckets for bucket-level risk: public access settings, encryption status, shared access, replication destinations.
Discovery Jobs
Run on-demand or on a schedule. Macie samples objects in each bucket and applies ML models + regex to classify sensitive data.
Findings
Two finding types: Policy findings (bucket misconfiguration โ€” public access, encryption disabled) and Sensitive data findings (detected PII or credentials in objects).
Integration
Findings sent to EventBridge for automated response and to Security Hub for centralized view across accounts.
Multi-Account
Delegated administrator model via AWS Organizations โ€” one account sees all findings across the org.
Macie Finding Types Core
Finding CategoryExampleAction
Policy: Public AccessS3 bucket has Block Public Access disabledEnable S3 Block Public Access
Policy: Encryption DisabledDefault encryption not configured on bucketEnable SSE-S3 or SSE-KMS
Policy: Shared ExternallyBucket policy grants access to external accountReview and tighten bucket policy
Sensitive Data: PIISSNs found in customer_data.csvEncrypt, restrict access, audit lineage
Sensitive Data: CredentialsAWS access key found in app_config.jsonRotate keys immediately, scan source code
Sensitive Data: FinancialCredit card numbers in payment_logs.txtEncrypt + restrict + review compliance
Macie Pricing Core
ComponentCostNotes
S3 Bucket Inventory & Monitoring$1.00 per bucket/month (first 1M)Evaluated even without running jobs
Sensitive Data Discovery$1.00 per GB analyzedBased on object bytes analyzed in jobs

Typical cost: An account with 50 buckets and 100 GB of data analyzed per month โ‰ˆ $50 + $100 = $150/month. 30-day free trial. Bucket inventory is the fixed ongoing cost; discovery job cost scales with data volume.

Macie vs Inspector vs GuardDuty — At a Glance Core
ServiceFindsWhere It LooksWhen to Enable
MacieSensitive data (PII, credentials) + bucket misconfigsS3 onlyAny account storing personal/financial data
InspectorSoftware vulnerabilities (CVEs) + network exposureEC2, ECR, LambdaAny account running compute workloads
GuardDutyActive threats (compromised creds, malware, exfiltration)CloudTrail, VPC Flow, DNS, S3, EKS, LambdaEvery account, every region, always
Compliance Use Cases

Macie is the go-to service for GDPR, HIPAA, and PCI-DSS compliance work in AWS. Use it to prove you know where personal data lives, ensure it is encrypted and access-controlled, and generate evidence for audits. Without it, you may be storing PII you don’t know about.

Macie — Key Takeaway

AWS Macie = ML-powered PII and sensitive data discovery for S3. It tells you what sensitive data you have, where it is, and whether it’s at risk of exposure. Pair with S3 Block Public Access, KMS encryption, and GuardDuty for a complete S3 security posture. Essential for any compliance-regulated workload.

Quick Decision Flow — Which Service Do You Need? Core
Block malicious HTTP?
YES → Add AWS WAF (SQLi, XSS, bots, rate limiting)
Need HTTPS?
YES → Use ACM (free, auto-renewing, zero-touch)
FIPS L3 / dedicated HSM?
YES → CloudHSM ($1,100/mo). NO → Use KMS (99% of cases)
High-value DDoS target?
YES → Shield Advanced ($3K/mo). NO → Shield Standard (free, automatic) is enough
Threat detection?
ALWAYS → Enable GuardDuty ($5–20/mo). No reason not to. Every account, every region.
CVE / vulnerability scanning?
YES → Enable Inspector (EC2 + ECR + Lambda, ~$5–10/mo typical). Find issues before attackers do.
Sensitive data (PII) in S3?
YES → Enable Macie ($1/bucket/mo + $1/GB analyzed). Essential for GDPR, HIPAA, PCI-DSS.
Minimum for Every Production Account

Shield Standard (free) + GuardDuty ($5–20/mo) + ACM (free) + WAF (if public-facing, ~$10–30/mo). Total: under $50/month for excellent security coverage. Add Shield Advanced and CloudHSM only when compliance or risk demands it.

Service Integration — Real Architecture Examples Deep

E-Commerce (Public Web)

  • CloudFront (edge caching)
  • Shield Standard (auto DDoS)
  • WAF (SQLi + XSS + rate limit + bot)
  • ACM cert on CloudFront
  • GuardDuty (all accounts)
  • Cost: ~$30–50/mo

Internal API (Corporate)

  • ALB (internal-facing)
  • WAF with IP allowlist only
  • ACM cert on ALB (internal TLS)
  • No Shield Advanced needed
  • GuardDuty (catch credential abuse)
  • Cost: ~$15–25/mo

Regulated (PCI/HIPAA)

  • CloudFront + Shield Advanced
  • WAF (OWASP + custom rules)
  • ACM + CloudHSM (FIPS L3)
  • KMS Custom Key Store
  • GuardDuty + Security Hub + auto-response
  • Cost: ~$4,200+/mo
All Seven Services — When to Use What Core
ServiceLayerProtects AgainstCost
WAFLayer 7 (HTTP)SQLi, XSS, bots, rate abuse$5/ACL + $0.60/M requests
ACMTransport (TLS)Expired certs, unencrypted trafficFree (public certs)
CloudHSMCryptographicRegulatory non-compliance, key exposure~$1,100/month per HSM
ShieldLayer 3/4 (+ 7 Advanced)DDoS attacks (volumetric + application)Free (Standard) / $3K/mo (Advanced)
GuardDutyAccount-wide intelligenceCompromised credentials, malware, exfiltration~$1–4/M events
InspectorWorkload vulnerabilityCVEs in EC2/ECR/Lambda, unintended network exposure~$0.11/EC2 + $0.09/ECR image/mo
MacieData security (S3)PII exposure, unencrypted sensitive data, bucket misconfigs$1/bucket/mo + $1/GB analyzed
🎯 Exam Tips — Security Services
  • "Block SQL injection" → WAF (Layer 7 inspection)
  • "Free HTTPS certificate" → ACM (DNS validation, auto-renewal)
  • "FIPS 140-2 Level 3" → CloudHSM (not KMS which is Level 2)
  • "DDoS protection with response team" → Shield Advanced
  • "Detect compromised EC2 instance" → GuardDuty
  • "Certificate for CloudFront" → ACM in us-east-1
  • "Crypto mining detection" → GuardDuty
  • "Rate limit API requests" → WAF rate-based rule
  • "Cost protection during DDoS" → Shield Advanced
  • "Scan EC2 or containers for CVEs" → Inspector
  • "Find vulnerabilities before exploitation" → Inspector (not GuardDuty)
  • "Discover PII in S3" or "find sensitive data in buckets" → Macie
  • "GDPR / HIPAA / PCI data discovery" → Macie
  • "Bucket policy made public" → Macie (policy finding) + GuardDuty
  • "How services work together" → Shield + WAF + CloudFront + GuardDuty + Inspector + Macie = layered defense
Security Services — Layered Defense Architecture
Internet Attackers + Users Shield DDoS filtering L3/L4 protection (automatic) WAF L7 inspection SQLi, XSS, bots rate limiting CloudFront / ALB TLS termination ACM certificate (HTTPS) Application ECS / EC2 / Lambda KMS encryption Secrets Manager GuardDuty (Threat Detection) Monitors ALL layers: CloudTrail + VPC Flow + DNS + S3 Traffic flows left → right ยท GuardDuty observes everything from below CloudHSM (if FIPS L3 required)
Shield (DDoS) → WAF (L7 filter) → CloudFront/ALB (TLS via ACM) → Application · GuardDuty watches everything