1.5 AWS WAF, Shield, and Network Firewall

Key Takeaways

  • AWS WAF protects web applications from common exploits like SQL injection, XSS, and bot traffic at the application layer (Layer 7).
  • AWS Shield Standard provides automatic DDoS protection at no extra cost; Shield Advanced provides enhanced protection with 24/7 DRT access for \$3,000/month.
  • AWS Network Firewall provides stateful and stateless packet-level inspection for VPC traffic.
  • WAF integrates with CloudFront, ALB, API Gateway, and AppSync — not with NLB or EC2 directly.
  • AWS Firewall Manager centrally manages WAF rules, Shield Advanced, security groups, and Network Firewall across multiple accounts.
Last updated: March 2026

AWS WAF, Shield, and Network Firewall

Quick Answer: WAF protects against web exploits (Layer 7) and attaches to CloudFront/ALB/API Gateway. Shield protects against DDoS (Standard is free, Advanced is $3,000/month). Network Firewall provides VPC-level packet inspection. Firewall Manager manages all three across accounts.

AWS WAF (Web Application Firewall)

AWS WAF protects web applications from common web exploits that could affect availability, compromise security, or consume excessive resources.

What WAF Protects Against

ThreatWAF Rule Type
SQL injectionSQL injection match condition
Cross-site scripting (XSS)XSS match condition
IP-based attacksIP set rule (allow/block specific IPs)
Geo-based blockingGeographic match condition
Rate-based attacksRate-based rule (e.g., max 2000 requests/5 minutes per IP)
Bot trafficBot Control managed rule group
Known bad actorsAWS Managed Rules (threat intelligence)

WAF Integration Points

ServiceLayerUse Case
Amazon CloudFrontEdge (global)Protect global web applications
Application Load Balancer (ALB)RegionalProtect backend web applications
Amazon API GatewayRegionalProtect APIs
AWS AppSyncRegionalProtect GraphQL APIs

On the Exam: WAF does NOT integrate with NLB (Network Load Balancer) or EC2 directly. If a question mentions NLB, WAF is not the answer.

Web ACLs and Rules

A Web ACL contains rules that define what traffic to allow, block, or count:

ComponentDescription
Web ACLContainer for rules; associated with CloudFront/ALB/API Gateway
RulesIndividual conditions (e.g., block if SQL injection detected)
Rule GroupsReusable collections of rules (managed or custom)
Default ActionAllow or Block traffic that does not match any rules

AWS Managed Rules

AWS provides pre-configured rule groups that address common threats:

  • Core Rule Set (CRS) — Protects against OWASP Top 10 vulnerabilities
  • Known Bad Inputs — Blocks requests with known malicious patterns
  • SQL Database — SQL injection protection
  • Bot Control — Manages bot traffic
  • IP Reputation — Blocks IPs from known threat sources

AWS Shield

AWS Shield provides DDoS (Distributed Denial of Service) protection.

Shield Standard vs. Shield Advanced

FeatureShield StandardShield Advanced
CostFree (automatic)$3,000/month + data transfer
ProtectionLayer 3/4 DDoSLayer 3/4/7 DDoS
Covered resourcesAll AWS resourcesEC2, ELB, CloudFront, Global Accelerator, Route 53
DDoS Response TeamNoYes (24/7 access to AWS DRT)
Cost protectionNoYes (credit for scaling charges during attack)
Advanced metricsNoYes (near real-time visibility)
WAF integrationNoYes (WAF included at no extra cost)

On the Exam: "The company wants DDoS protection with cost protection against scaling charges during an attack" → Shield Advanced. "Basic DDoS protection" → Shield Standard (already enabled by default).

AWS Network Firewall

AWS Network Firewall is a managed firewall service that provides fine-grained network traffic control for VPCs.

FeatureDescription
InspectionStateful and stateless packet inspection
RulesProtocol, port, IP address, domain name filtering
IPS/IDSIntrusion prevention and detection signatures
TLS inspectionCan decrypt and inspect TLS traffic
DeploymentDeployed in a dedicated firewall subnet
ScalingFully managed, scales automatically

Use cases:

  • Filter outbound traffic to prevent data exfiltration
  • Block connections to known malicious domains
  • Inspect traffic between VPCs (in Transit Gateway architecture)
  • Comply with regulations requiring network-level inspection

AWS Firewall Manager

AWS Firewall Manager centrally manages firewall rules across multiple accounts and resources in an organization.

ManagesDescription
WAF rulesDeploy WAF Web ACLs across accounts
Shield AdvancedManage Shield Advanced subscriptions and protections
Security groupsAudit and enforce security group policies
Network FirewallDeploy Network Firewall rules across VPCs
Route 53 Resolver DNS FirewallManage DNS filtering rules

Prerequisite: AWS Organizations must be enabled to use Firewall Manager.

Test Your Knowledge

A company needs to protect its public-facing web application against SQL injection attacks. The app is served via an Application Load Balancer. What should they use?

A
B
C
D
Test Your Knowledge

Which AWS Shield tier provides cost protection (credits for scaling charges during a DDoS attack)?

A
B
C
D
Test Your Knowledge

AWS WAF can be attached to which of the following? (Select the BEST answer)

A
B
C
D