Why am I getting a limit exceeded error when adding more rules to a rule group in AWS WAF?
"When trying to add more rules to a rule group, I'm getting the error that I've exceeded a limit. What is reason for this error?"
"When trying to add more rules to a rule group, I'm getting the error that I've exceeded a limit. What is reason for this error?Short descriptionIf adding additional rules results in exceeding the rule group capacity, you get a limit exceeded error when saving the changes:In AWS WAF Classic, the error appears as "Operation would result in exceeding resource limits."In AWS WAF, the error appears as "WAFInvalidParameterException: Error reason: You exceeded the capacity limit for a rule group or web ACL., field: RULE_GROUP, parameter: xx".The following limits apply in AWS WAF Classic or AWS WAF:In AWS WAF classic, the rule groups that you create have a quota of 10 rules per rule group.In AWS WAF, the capacity of a rule group is set when it's created. This capacity can't be changed after the rule group is created.ResolutionTo resolve the limit exceeded errors, perform the following steps in AWS WAF Classic or AWS WAF:AWS WAF ClassicYou can't add more rules to rule group that has reached capacity. You must create a new rule group, and then add the rule group to the web ACL.Open the AWS WAF console.In the navigation pane, choose Switch to AWS WAF Classic.In the navigation pane, choose Rule groups.For Filter, choose the AWS Region where you want to store the IP set. To use an IP set in web ACLs that protect Amazon CloudFront distributions, you must use Global (CloudFront).Choose Create rule group.Choose Use existing rules for this group.Choose Next.Enter a Rule group name.Select a rule, and then choose Add rule. Repeat this step for all rules that you want to add.Choose Create.In the navigation pane, choose Web ACLs.Select the web ACL where you want to add the new rule group.On the Rules tab, choose Edit web ACL.For Rules, choose the new rule group.Select Add rule to web ACL.Choose Update.Note: You can only add two rule groups to a web ACL in AWS WAF Classic. If you need to add more rule groups, you must migrate to AWS WAF.AWS WAFThe capacity of the rule group can't be changed after it's created. You must create a new rule group, and then add it to the web ACL.Open the AWS WAF console.In the navigation pane, choose Rule groups.For Region, choose the AWS Region where you want to store the rule group. To use a rule group in web ACLs that protect Amazon CloudFront distributions, you must use Global (CloudFront).Choose Create rule group.Enter a Name for the rule group.Be sure the correct region is selected, and then choose Next.For Rules, add the rules for your web ACL.For Capacity, set an appropriate capacity for the rule group that allows for adding more rules later. Then, choose Next.(Optional) For Set Rule Priority, select your rules and move the priority order. The rules are processed in the order that they appear. For more information, see Processing order of rules and rule groups in a web ACL. Then, choose Next.Review the settings for the rule group. If it matches your specifications, choose Create rule group.In the navigation pane, under AWS WAF, choose Web ACLs.Select your web ACL.Choose Rules, and then choose Add Rules, Add my own rules and rule groups.For Rule Type, select Rule group.Enter a Name for the rule.For Rule Group, add your new rule group to the web ACL.Choose Add rule.Choose Save.The capacity set on the rule group is an estimation of the number and type of rules that will be added to the rule group later. For estimates of web ACL capacity units used by different types of rules, see Rule statements list.Related informationRule groupsFollow"