Edit a listener rule
You can edit the conditions, actions, and priority of a listener rule.
- Console
-
To edit a listener rule
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Load Balancers.
-
Choose the name of the load balancer to open its detail page.
-
On the Listeners and rules tab, choose the text in the Protocol:Port column to open the detail page for the listener.
-
On the Rules tab, select the check box for the rule to modify, and then choose Actions, Edit rule.
-
Update the conditions or actions as needed.
-
Choose Next.
-
For Priority, enter a value from 1-50,000. Rules are evaluated in priority order from the lowest value to the highest value.
-
Choose Next.
-
On the Review and create page, choose Save changes.
- AWS CLI
-
To edit a listener rule
Use the following modify-rule command to update the conditions and actions of a rule.
aws elbv2 modify-rule \ --rule-arnrule-arn\ --conditions '[{"Field":"source-ip","SourceIpConfig":{"IpAddressType":"ipv6"}}]' \ --actions '[{"Type":"forward","TargetGroupArn":"new-target-group-arn"}]'