SAA-C03 ยท Network security in the VPC
AWS WAF and AWS Shield
Protecting web apps from SQL injection, cross-site scripting and bots with WAF rules on CloudFront, ALB or API Gateway, and DDoS protection with Shield Standard and Shield Advanced.
Key points
- AWS WAF: layer 7 firewall.
- Web ACL: managed rule groups (SQL injection, cross-site scripting), rate-based rules, IP sets.
- Attaches to CloudFront, ALB, API Gateway REST API, AppSync, Cognito user pool.
- For CloudFront: create in US East (N. Virginia).
- Shield Standard: automatic, no extra charge, common DDoS.
- Shield Advanced (paid): better detection, automatic layer 7 mitigation, Shield Response Team, cost protection, WAF fees covered.
Source: https://docs.aws.amazon.com/waf/latest/developerguide/how-aws-waf-works-resources.html
Practice questions
Which service filters HTTP requests to block SQL injection and cross-site scripting attempts?
- AWS Shield Standard
- AWS WAF
- Amazon GuardDuty
- VPC security groups
Show answer
Answer: B. AWS WAF
AWS WAF inspects web requests at layer 7 and can block SQL injection and cross-site scripting patterns. Shield focuses on DDoS, security groups filter by address, port and protocol, and GuardDuty detects threats rather than filtering requests inline.
Which resources can you associate an AWS WAF web ACL with?
- Amazon CloudFront distribution
- Application Load Balancer
- Amazon API Gateway REST API
- Network Load Balancer
- A single Amazon EC2 instance
Show answer
Answer: A. Amazon CloudFront distribution, B. Application Load Balancer, C. Amazon API Gateway REST API
WAF protects CloudFront distributions and regional resources including Application Load Balancers and API Gateway REST APIs. Network Load Balancers and individual EC2 instances are not supported association targets.
To get any DDoS protection from AWS Shield, you must first buy a Shield Advanced subscription.
Show answer
Answer: False
False. Shield Standard is applied automatically to all AWS customers at no extra charge and covers common network and transport layer attacks. Shield Advanced is the optional paid tier for higher protection and extra services.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
