capabilities.work

Add a Host-Based Routing Rule

A 3-step recipe with Amazon Elastic Load Balancing. We can help you get access.

Recipe · 3 steps

Add a Host-Based Routing Rule

Create a target group and a host-header forwarding rule on a listener.

  1. Create the HTTP target group that the host-based rule will forward to.
  2. Create a host-header condition rule that forwards matching requests to the new target group at the supplied priority.
  3. Read the listener's rules back to confirm the new rule is present.
What you'll need to have ready
  • listenerArn: The ARN of the existing listener to attach the rule to.
  • targetGroupName: The unique name for the new target group.
  • vpcId: The ID of the VPC for the target group.
  • port: The port the targets receive traffic on.
  • hostHeader: The host header value to match (e.g. api.example.com).
  • priority: The unique rule priority within the listener (1-50000).
For your developer

Arazzo workflow amazon-elastic-load-balancing:add-host-based-routing-rule, 3 operations: CreateTargetGroup → CreateRule → DescribeRules. Specs on APIs.io.