Back to results for “Applications”
AWS › AWS WAF & Shield

What is AWS WAF and how does it protect web applications from common attacks?

Beginner

Answer

AWS WAF, or Web Application Firewall, lets you create rules that inspect incoming web requests to your CloudFront distribution, Application Load Balancer, or API Gateway, and block or allow traffic based on conditions you define, such as blocking requests containing SQL injection patterns or cross site scripting attempts, protecting your application at the network edge before malicious requests ever reach your actual backend servers.
aws wafv2 create-web-acl --name my-web-acl --scope REGIONAL --default-action Allow={} --rules file://waf-rules.json
Real-world example An e commerce website attaches AWS WAF rules to its Application Load Balancer that automatically block requests containing common SQL injection patterns, preventing attackers from exploiting vulnerabilities in the application's database queries.

Common follow-ups: What is the difference between AWS WAF's managed rule groups and custom rules?;Which AWS services can AWS WAF be attached to?