Protecting the application layer with AWS WAF rate-based rules and Shield Advanced
This page explains how AWS WAF rate-based rules and Shield Advanced work together to create basic application layer protections.
When you use a rate-based rule with its default configuration, AWS WAF periodically evaluates traffic for the prior 5-minute time window. AWS WAF blocks requests from any IP address that exceeds the rule's threshold until the request rate drops down to an acceptable level. When you configure a rate-based rule through Shield Advanced, configure its rate threshold to a value that's greater than the normal traffic rate that you expect from any one source IP in any five minute time window.
You might want to use more than one rate-based rule in a web ACL. For
example, you could have one rate-based rule for all traffic that has a high
threshold plus one or more additional rules that are configured to match
select parts of your web application and that have lower thresholds. For
example, you might match on the URI /login.html
with a lower
threshold, to mitigate abuse against a login page.
You can configure a rate-based rule to use a different evaluation time window and to aggregate requests by a number of request components, like header values, labels, and query arguments. For more information, see Using rate-based rule statements in AWS WAF.
For additional information and guidance, see the security blog post The three most important AWS WAF rate-based rules
Expanded configuration options through AWS WAF
The Shield Advanced console enables you to add a rate-based rule and configure it with the basic, default settings. You can define additional configuration options by managing your rate-based rules through AWS WAF. For example, you can configure the rule to aggregate requests based on keys such as a forwarded IP address, a query string, and a label. You can also add a scope-down statement to the rule to filter out some requests from evaluation and rate limiting. For more information, see Using rate-based rule statements in AWS WAF.