CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
  • Week 1
    • 1.AWS from a Developer's Perspective: Regions, Infrastructure, and the Boundary of Responsibility
    • 2.The 4 Core Entities of IAM: User, Group, Role, Policy
    • 3.STS and Policy Conditions: The Deep World of Temporary Credentials
    • 4.AWS CLI and SDK: From Credential Chaining to SigV4
    • 5.Week 1 Review: The Chain of Trust Built by Infrastructure and IAM
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
  • Week 9
    • 1.KMS: Handling Encryption Keys Without Touching Them Directly
    • 2.Secrets Manager and Parameter Store: Getting Secrets Out of Code
    • 3.Cognito: Why Authentication and Authorization Split Into Two Pools
    • 4.WAF, Shield, ACM: Three Layers to Filter Traffic Before It Touches the App
    • 5.Week 9 Review: Security Is Not a Single Setting but the Sum of Layers
  • Week 10
  • Week 11
  • Week 12
  • Week 13
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← DVA-C02/Week 9/Day 4

Based on the DVA-C02 exam guide·Report an error

DVA-C02· AssociateWeek 9 · Day 4~23 min read

Day 4 - WAF, Shield, ACM: Three Layers to Filter Traffic Before It Touches the App

Security has two schools of thought. One: "defend well inside" — validate input, parameterize queries, escape output at the application layer. The other: "filter early outside" — stop malicious traffic at the network edge before it reaches the application. Both matter. App defense alone and a DDoS kills the server instantly. Edge defense alone and sophisticated logic attacks get through. AWS's WAF, Shield, and ACM are three layers handling different threats at the network edge — WAF guards against L7 application attacks, Shield against L3/L4 DDoS, ACM against transport encryption.

In DVA-C02, these three appear as "which service for which threat?" questions. SQL injection → WAF. DDoS cost surge → Shield Advanced. CloudFront HTTPS → us-east-1 ACM. Understanding which OSI layer each addresses is the key.

Defense by OSI Layer

Understanding these three fastest is placing them on the OSI model.

ServiceLayerThreats Blocked
ShieldL3(Network) / L4(Transport)SYN flood, UDP reflection volume DDoS
WAFL7(Application)SQL injection, XSS, bots, abnormal patterns
ACML6/L7(Presentation/Session), TLSEavesdropping, tampering (prevented by encryption)

💡 Related theory: Why Shield and WAF are separate makes sense when you understand DDoS by layer. L3/L4 attacks (SYN flood) exploit protocol weaknesses — flood half-open connections exhausting the connection table. Request content is irrelevant; volume wins. L7 attacks (HTTP flood, slow POST) send valid-looking HTTP to exhaust app processing. Content matters to detect malicious vs. legitimate. Volume-based attacks need network-edge absorption (Shield), while content attacks need HTTP parsing (WAF). Threat nature differs, so tools differ.

WAF: Parse Requests and Filter by Rule at L7

WAF (Web Application Firewall) parses HTTP/HTTPS requests and applies Actions if they match Rules. Rules live in Web ACL (Access Control List), evaluated top-to-bottom by priority.

Rule TypeWhat It Sees
IP SetSource IP(CIDR) allow/block
Geo MatchSource country
String/Regex MatchURL, headers, body patterns
SQLi MatchSQL injection patterns auto-detected
XSS MatchCross-site scripting patterns
Size ConstraintRequest component sizes
Rate-basedIP requests in 5-minute window
Managed RulesOWASP Top 10, IP Reputation, etc.

Actions are five.

ActionBehavior
AllowPass through
BlockDeny (custom 4xx possible)
CountNo block, just count (test mode)
CAPTCHAHuman verification puzzle
ChallengeBackground JS challenge (auto-filter bots)

🔍 Going deeper: Count mode is operationally critical. Rolling a new rule into Block immediately risks false positives hitting real users — outages. Deploy in Count mode first — no blocking, only "requests that would match" logged to CloudWatch metrics and samples. Observe for days, verify no false positives, then promote to Block. This "observe → verify → enforce" deployment pattern mirrors IDS "monitor mode → prevent mode." Count answers "test a rule without affecting traffic?"

💡 Related theory: Rate-based Rule uses a sliding 5-minute window counter per-IP, not token bucket. Count requests in the last 5 minutes per source IP; exceed threshold → block. Different from app-level rate limiting (e.g., API Gateway throttling) because it auto-tracks by source IP. Brute-force login or scraping by one IP gets caught. Caveat: multiple users behind NAT share one IP and share the limit — corporate networks may false-positive.

WAF attachment points have constraints.

ResourceWAF Support
CloudFrontSupported (Global scope, us-east-1)
ALBSupported (Regional)
API Gateway RESTSupported (Regional)
API Gateway HTTPNot supported
AppSyncSupported
Cognito User PoolSupported (2022+)
NLBNot supported(L4, no HTTP parsing)

⚠️ Trap: API Gateway HTTP API does not directly support WAF. If WAF is needed, put CloudFront in front and attach WAF there. NLB is L4, so HTTP is not parsed — WAF targets only L7-aware resources. "WAF on HTTP API" or "WAF on NLB" are trap answers.

Shield: Free Auto-Defense and Paid Premium Defense

Shield comes in two tiers. Standard is free, auto-applied to all AWS customers — L3/L4 DDoS defense. EC2, ELB, CloudFront, Route 53 automatically protected against SYN/UDP floods without setup. Advanced is $3,000/month but adds decisive added value beyond "stronger defense."

ItemStandardAdvanced
CostFree$3,000/month
LayersL3/L4L3/L4/L7
Protected ResourcesAuto (all resources)Explicit enrollment (CloudFront, ALB, NLB, EIP, R53, Global Accelerator)
DDoS Cost ProtectionNoneHas(DDoS-caused cost credits)
SRT SupportNone24/7 Shield Response Team
WAF CostSeparateIncluded
Real-Time VisibilityNoneHas

⚠️ Trap: The clearest signal for Shield Advanced is "DDoS cost protection." DDoS attacks trigger Auto Scaling (instance explosion) or CloudFront data transfer surge — bills skyrocket. Advanced refunds DDoS-caused cost spikes as credits. Simple "basic DDoS defense" is Standard (free). If "DDoS cost surge protection" or "24/7 expert response" appears, it's Advanced. Standard suffices for baseline.

💡 Related theory: Shield Response Team (formerly DRT, DDoS Response Team) is Advanced's human element. Massive, sophisticated attacks may require real AWS security experts adjusting WAF rules in real-time and analyzing patterns. This isn't just automation — it's a service contract: "you have someone to call during attack." Bundling expert labor into a security service tier is standard enterprise practice — the $3,000 partly buys tools, partly buys on-call expertise.

Manage WAF/Shield Advanced across accounts via Firewall Manager (requires AWS Organizations). Auto-apply policies to new resources organization-wide.

ACM: Free TLS Certificates, AWS Services Only

ACM (AWS Certificate Manager) issues and auto-renews SSL/TLS certs at no cost. One critical constraint appears constantly on exams.

⚠️ Trap: ACM certificates cannot be installed on EC2 directly. ACM refuses to export the private key — the key never crosses ACM's boundary (mirroring KMS's key-isolation philosophy). EC2 direct TLS termination requires the key file on the instance, so ACM won't provide it. Either put ALB/CloudFront in front (ACM cert there, TLS terminates at ALB/CloudFront, unencrypted back to EC2), or install a separate cert on EC2 (Let's Encrypt, etc.). "Install ACM cert on EC2" is always wrong.

ACM applies to: CloudFront, ALB, NLB, API Gateway, App Runner, App Mesh, Cognito, Elastic Beanstalk. Common thread: AWS-managed endpoints where ACM manages TLS internally without exporting keys.

⚠️ Trap: ACM certs for CloudFront must be issued in us-east-1 (N. Virginia). CloudFront is global; its control plane lives in us-east-1. Certs from ap-northeast-2 won't attach to CloudFront. Regional resources (ALB, etc.) use certs from their region. "CloudFront cert region" → always us-east-1.

Validation methods split two ways.

MethodSpeedAuto-Renewal
DNS validation(recommended)FastAutomatic(CNAME persists)
Email validationSlowManual (person clicks per expiry)

🔍 Going deeper: DNS validation is preferred because it auto-renews. ACM puts a CNAME in DNS once; at expiry approaching, ACM re-validates via that CNAME and auto-renews. Zero human involvement. Email validation mails the domain admin; they click to confirm per expiry — common failure point: people forget, cert expires, site dies. Route 53 auto-inserts the CNAME for you. For internal services, mTLS, or IoT, private ACM Private CA ($400/month) runs your own CA.

Edge Defense Stacked Together

The three usually layer like this.

[Internet]
   │  ← Shield (Standard auto / Advanced enrolled) absorbs L3/L4 DDoS
   ▼
[CloudFront]  ── ACM cert (us-east-1) terminates HTTPS
   │  ← WAF (Global scope) blocks SQLi/XSS/Rate/Geo
   ▼
[ALB]  ── ACM cert (same region) terminates HTTPS
   │  ← Optional additional WAF (Regional)
   ▼
[EC2 / Lambda / ECS]  ← ACM cannot install here directly

📚 Case study: A service faced bot traffic from one country. Instead of immediate WAF Block, they ① first ran Geo rule in Count mode for days to measure real traffic, ② crafted Rate-based + Challenge (JS challenge) to auto-filter bots while legitimate users pass, ③ only then applied IP Set Block to clearly-malicious IPs. Staged deployment avoiding false positives. "Block first" is dangerous; "Count to verify" is standard.

Tangent Security Services Summary

Occasional exam appearances of detection/investigation services warrant role clarity.

ServiceFunction
MacieML auto-detects PII (credit cards, SSNs) in S3
GuardDutyDetects account-activity anomalies (CloudTrail/VPC Flow/DNS logs)
InspectorScans EC2/ECR images for vulnerabilities/CVEs
DetectiveInvestigates security incident root causes
Security HubUnified dashboard for all security alerts

⚠️ Trap: "Auto-find credit cards/SSNs in S3" = Macie. "Spot weird API calls/coin mining" = GuardDuty. "Scan packages for CVEs" = Inspector. Names sound similar; targets differ — data (Macie) vs. behavior (GuardDuty) vs. vulnerability state (Inspector).

Wrapping Up

WAF, Shield, ACM are three edge layers — Shield blocks L3/L4 DDoS (Standard free, Advanced pays for cost protection + SRT), WAF blocks L7 app attacks (Count first to verify, then Block), ACM terminates TLS (EC2 direct install impossible, CloudFront requires us-east-1). Threat OSI layer determines the tool. "Which service for which attack?" compresses to one question once you recognize the layer.

Next: Week 9 recap — KMS, Secrets Manager, Cognito, WAF/Shield/ACM stitched together as a security architecture.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Block SQL injection attacks at the request stage. Right service?

Question 2

DDoS hits; Auto Scaling and data transfer soar; bill explodes. Protect cost. Right choice?

Question 3

CloudFront HTTPS needs ACM cert. Which region?

Question 4

Install ACM cert directly on EC2 for TLS termination. Result?

Question 5

Test new WAF rule safely — observe without blocking. Which action?

Question 6

API Gateway HTTP API needs WAF for SQL injection. Direct attach fails. Solution?

Question 7

Detect customer credit cards/SSNs auto-stored in S3. Right service?

PreviousCognito: Why Authentication and Authorization Split Into Two PoolsWeek 9 · Day 3Next Week 9 Review: Security Is Not a Single Setting but the Sum of LayersWeek 9 · Day 5

Official references

  • DVA-C02 official exam page(opens in a new tab)
  • AWS WAF · Shield documentation(opens in a new tab)
  • AWS Certificate Manager documentation(opens in a new tab)
  • Amazon CloudFront documentation(opens in a new tab)
  • Elastic Load Balancing documentation(opens in a new tab)
  • Amazon EC2 documentation(opens in a new tab)

On this page

  • Defense by OSI Layer
  • WAF: Parse Requests and Filter by Rule at L7
  • Shield: Free Auto-Defense and Paid Premium Defense
  • ACM: Free TLS Certificates, AWS Services Only
  • Edge Defense Stacked Together
  • Tangent Security Services Summary
  • Wrapping Up
  • Practice Questions