Lesson 22 of 30
XSS and CSRF defenses protect what a request is allowed to do once it's let through. WAF and Shield decide whether it gets that far at all — a different layer, not a replacement for the app-layer defenses.
10 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A team assumes DDoS protection is something they need to explicitly enable on their AWS resources. Is that accurate for the baseline tier?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
WAF (Web Application Firewall) sits in front of CloudFront, an ALB, or API Gateway and inspects every incoming request against a set of rules attached to a web ACL, before the request ever reaches your application:
Shield is AWS's DDoS protection, in two tiers:
A web ACL attached to API Gateway includes AWS's managed SQL injection rule group and a rate-based rule capping any single IP at a defined request threshold per five minutes. A request arrives with a SQLi pattern in a query string parameter — WAF matches it against the managed rule group and blocks it with a 403, and the request never reaches the backend Lambda function at all. Separately, an IP sending an abnormal volume of requests trips the rate-based rule and gets throttled, independent of whether any individual request looks malicious.
SameSite cookies) protect against what a request does once it's legitimately let through; WAF's pattern-based rules are a broad net that complements those, not a substitute for actually escaping output or parameterizing queries in application code, since a crafted payload can evade signature matching."How would you protect a public API from abuse or a DDoS attempt?" tests whether a candidate can name the specific layers involved — Shield Standard as an automatic baseline, WAF's managed and rate-based rules sitting in front of the entry point — and explicitly place that alongside, not instead of, the app-layer defenses like input validation and CSRF protection from elsewhere in this track.