AWS WAF, AWS Firewall Manager, and AWS Shield Advanced
Developer Guide (API Version 2015-08-24)

Associating or Disassociating a Web ACL with an Amazon API Gateway API, a CloudFront Distribution or an Application Load Balancer

To associate or disassociate a web ACL, perform the applicable procedure. Note that you also can associate a web ACL with a CloudFront distribution when you create or update the distribution. For more information, see Using AWS WAF to Control Access to Your Content in the Amazon CloudFront Developer Guide.

The following restrictions apply when associating a web ACL:

  • Web ACLs associated with an Application Load Balancer can be associated only with another Application Load Balancer in the same region. The same is true for API Gateway APIs.

  • Web ACLs associated with a CloudFront distribution cannot be associated with an Application Load Balancer. The web ACL can, however, be associated with other CloudFront distributions.

  • Each API Gateway API, Application Load Balancer and CloudFront distribution can be associated with only one web ACL.

To associate a web ACL with an API Gateway API, CloudFront distribution or Application Load Balancer

  1. Sign in to the AWS Management Console and open the AWS WAF console at https://console.aws.amazon.com/waf/.

  2. In the navigation pane, choose Web ACLs.

  3. Choose the web ACL that you want to associate with an API Gateway API, CloudFront distribution or Application Load Balancer.

  4. On the Rules tab, under AWS resources using this web ACL, choose Add association.

  5. When prompted, use the Resource list to choose the API Gateway API, CloudFront distribution or Application Load Balancer that you want to associate this web ACL with. If you choose an Application Load Balancer, you also must specify a region.

  6. Choose Add.

  7. To associate this web ACL with an additional API Gateway API, CloudFront distribution or another Application Load Balancer, repeat steps 4 through 6.

To disassociate a web ACL from an API Gateway API, CloudFront distribution or Application Load Balancer

  1. Sign in to the AWS Management Console and open the AWS WAF console at https://console.aws.amazon.com/waf/.

  2. In the navigation pane, choose Web ACLs.

  3. Choose the web ACL that you want to disassociate from an API Gateway API, CloudFront distribution or Application Load Balancer.

  4. On the Rules tab, under AWS resources using this web ACL, choose the x for each API Gateway API, CloudFront distribution or Application Load Balancer that you want to disassociate this web ACL from.