How can I route traffic based on a custom HTTP header using an Application Load Balancer?
I want to use an Application Load Balancer to perform a specific action on requests based on the value of a custom HTTP header.
"I want to use an Application Load Balancer to perform a specific action on requests based on the value of a custom HTTP header.ResolutionCreate an Application Load Balancer.Open the Amazon Elastic Compute Cloud (Amazon EC2) console.On the navigation pane, under Load Balancing, choose Load Balancers.Select your load balancer.Choose the Listeners tab.Select your listener, and then from the Actions dropdown, choose View listener details.Under Rules, choose Manage rules.Choose the Add rules icon (the plus sign), and then choose Insert rule.Choose Add condition, and then choose Http header.Specify a header name based on the desired action. For example, "Accept."Note: The maximum size of each header name is 40 characters. The header name isn't case sensitive. Wildcards aren't supported.Specify the values (comparison strings) of the custom header.Note: The maximum size of each comparison string is 128 characters. The comparison string isn't not case sensitive. The asterisk (*) and question mark (?) wildcard characters are supported.Choose Add action, and then select the required action. For example:Forward – To forward to a different target group.Redirect to - To redirect to a different URL.Return fixed response – To block or provide a custom response to particular clients based on the value of custom header.Choose Save.Related informationListener rules for your Application Load BalancerFollow"