Usually, it’s quite easy to delete an AWS WAF, or Web ACL. But sometimes you may come across the following error when attempting to delete the actual WAF:

AWS WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.

What this means

When you get this error, it means that there is something attached to the WAF that is currently using it.

This could be an API Gateway, an Application Load Balancer, or potentially some Rule Sets that are still attached.

How to delete the AWS WAF / Web ACL

Step 1. Disassociate AWS Resources

Under the Web ACLs tab, select the WAF that you would like to delete. In my case it is waf-test-1 as shown in the image above.

Navigate over to Associated AWS resources and you will see which AWS resources are attached.

Click on each item, and then click on the Disassociate button to release the AWS resource.

Type remove in the modal box that appears.

Do the same for any other items in the list.

When you have completed this, there should be no AWS resources left in the Associated AWS resources list.

Step 2. Delete the AWS WAF / Web ACL

You can now navigate back to Web ACLs, select the WAF and click the Delete button.

Type delete into the modal box that appears.

You have now successfully deleted the AWS WAF Web ACL.