What is your WAF strategy for a public API?
AdvancedScenarioSecurity: Firewalls, SGs, NACLs & VPN
Answer
Situation read → Layers of rules with lifecycle management.
What I'd do →
- Attach WAF at CloudFront or the ALB with managed core, known-bad-inputs and IP reputation groups
- Add rate-based rules by IP and by API key header
- Add custom rules for your path and method patterns, and body size limits
- Log to S3 or Kinesis and analyze with Athena
- Deploy changes through IaC with a count-mode stage and review false positives weekly
Why → A WAF is a tuned control, not a one-time setting.
Interview tip → Say bot and API abuse need behavior-based protection beyond signatures.
More on Security: Firewalls, SGs, NACLs & VPN
Security group versus NACL: explain the differences.BeginnerHow do you let only your office IP SSH into a server?BeginnerWhat does it mean that a security group can reference another security group?BeginnerStateful versus stateless firewalls: what is the practical difference?BeginnerWhat is a WAF and where do you place it?BeginnerWhat is the difference between a site-to-site VPN and a client VPN?Beginner