AWS WAF web access control lists (web ACLs) - AWS WAF, AWS Firewall Manager, and AWS Shield Advanced

AWS WAF web access control lists (web ACLs)

A web access control list (web ACL) gives you fine-grained control over all of the HTTP(S) web requests that your protected resource responds to. You can protect Amazon CloudFront, Amazon API Gateway, Application Load Balancer, AWS AppSync, Amazon Cognito, AWS App Runner, and AWS Verified Access resources.

You can use criteria like the following to allow or block requests:

  • IP address origin of the request

  • Country of origin of the request

  • String match or regular expression (regex) match in a part of the request

  • Size of a particular part of the request

  • Detection of malicious SQL code or scripting

You can also test for any combination of these conditions. You can block or count web requests that not only meet the specified conditions, but also exceed a specified number of requests in a single minute. You can combine conditions using logical operators. You can also run CAPTCHA puzzles and silent client session challenges against requests.

You provide your matching criteria and the action to take on matches in AWS WAF rule statements. You can define rule statements directly inside your web ACL and in reusable rule groups that you use in your web ACL. For a full list of the options, see Rule statement basics and Rule action.

To specify your web request inspection and handling criteria, perform the following tasks:

  1. Choose the web ACL default action, either Allow or Block, for web requests that don't match any of the rules that you specify. For more information, see The web ACL default action.

  2. Add any rule groups that you want to use in your web ACL. Managed rule groups usually contain rules that block web requests. For information about rule groups, see AWS WAF rule groups.

  3. Specify additional matching criteria and handling instructions in one or more rules. To add more than one rule, start with AND or OR rule statements and nest the rules that you want to combine under those. If you want to negate a rule option, nest the rule in a NOT statement. You can optionally use a rate-based rule instead of a regular rule to limit the number of requests from any single IP address that meets the conditions. For information about rules, see AWS WAF rules.

If you add more than one rule to a web ACL, AWS WAF evaluates the rules in the order that they're listed for the web ACL. For more information, see Web ACL rule and rule group evaluation.

When you create a web ACL, you specify the types of resources that you want to use it with. For information, see Creating a web ACL. After you define a web ACL, you can associate it with your resources to begin providing protection for them. For more information, see Associating or disassociating a web ACL with an AWS resource.

How AWS resources handle response delays from AWS WAF

On some occasions, AWS WAF might encounter an internal error that delays the response to associated AWS resources about whether to allow or block a request. On those occasions, CloudFront typically allows the request or serves the content, while the Regional services typically deny the request and don't serve the content.