- Newest
- Most votes
- Most comments
Yes, you can adjust the priority of rules in an AWS WAF web ACL using the console, even if there's a gap in the priority numbering. Here's how you can make another rule take priority 1:
- Open the AWS WAF console.
- Navigate to "Web ACLs" and select your specific web ACL.
- Go to the "Rules" tab.
- Find the rule you want to move to priority 1.
- Click "Edit" for that rule.
- After making any necessary changes (or even if no changes are needed), click "Save rule".
- You'll now see a "Set Rule Priority" option.
- Select your rule and use the "Move up" button to shift it to the top position (priority 1).
- Save your changes.
This process will allow you to reorganize your rules and fill the gap left by the deleted rule. AWS WAF evaluates rules based on their priority, with lower numbers being processed first. The priorities don't need to be consecutive, but they must all be different.
It's good to know that resetting your CloudFormation stack resolved the issue for you. This is because CloudFormation manages the entire state of your resources, including rule priorities. When you reset or update the stack, it ensures that all resources, including WAF rules and their priorities, are in the desired state as defined in your template.
Sources
Change priority of the rules in AWS WAF web ACL | AWS re:Post
AWS::WAFv2::WebACL Rule - AWS CloudFormation
Rule - AWS WAFV2
answered 2 years ago
Relevant content
asked 5 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 months ago
