Create a Gateway Load Balancer - Elastic Load Balancing

Create a Gateway Load Balancer

A Gateway Load Balancer takes requests from clients and distributes them across targets in a target group, such as EC2 instances.

Before you begin, ensure that the virtual private cloud (VPC) for your Gateway Load Balancer has at least one subnet in each Availability Zone where you have targets.

To create a Gateway Load Balancer using the AWS CLI, see Getting started using the CLI.

To create a Gateway Load Balancer using the AWS Management Console, complete the following tasks.

Step 1: Configure your target group and register targets

You can register targets, such as EC2 instances, with a target group. The target group that you configure in this step is used as the target group in the lP listener routing section, when you configure your load balancer. For more information, see Target groups.

To configure your target group

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, under Load Balancing, choose Target Groups.

  3. Choose Create target group.

  4. Basic configuration

    1. For Choose a target type, select Instances to specify targets by instance ID, or select IP addresses to specify targets by IP address.

    2. For Target group name, enter a name for the target group.

    3. Verify that Protocol is set to GENEVE, and the Port is set to 6081. No other values for Protocol and port are supported.

    4. For VPC, select a virtual private cloud (VPC) with the instances that you want to include in your target group.

  5. In the Health checks section (optional), modify the default settings as needed. For Advanced health check settings, choose the health check port, count, timeout, and interval, and then specify success codes. If health checks consecutively exceed the Unhealthy threshold count, the load balancer takes the target out of service. If health checks consecutively exceed the Healthy threshold count, the load balancer puts the target back in service. For more information, see Health checks for your target groups.

  6. For Tags (optional), add one or more tags as follows:

    1. Expand the Tags section.

    2. Choose Add tag.

    3. Enter the tag Key and tag Value. Allowed characters are letters, spaces, numbers (in UTF-8), and the following special characters: + - = . _ : / @. Do not use leading or trailing spaces. Tag values are case-sensitive.

  7. Choose Next

  8. In the Register targets page, add one or more targets as follows:

    • If the target type is Instances, select one or more instances, enter one or more ports, and then choose Include as pending below.

    • If the target type is IP addresses, select the network, enter the IP address and ports, and then choose Include as pending below.

  9. Choose Create target group.

Step 2: Configure the load balancer and listener

Use the following procedure to create your Gateway Load Balancer. Provide basic configuration information for your load balancer, such as a name and IP address type (currently only IPv4 is supported). Then provide information about your network, and the IP listener that routes traffic to your target groups. Only target groups with GENEVE are available for use with the Gateway Load Balancer.

To create a Gateway Load Balancer

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, under Load Balancing, choose Load Balancers.

  3. Choose Create Load Balancer.

  4. Under Gateway Load Balancer, choose Create.

  5. Basic configuration

    1. For Load balancer name, enter a name for your load balancer. For example, my-glb. The name of your Gateway Load Balancer must be unique within your set of load balancers for the Region. It can have a maximum of 32 characters, can contain only alphanumeric characters and hyphens, and must not begin or end with a hyphen.

    2. For IP address type, you must choose IPv4, because your clients can only use IPv4 addresses to communicate with the load balancer.

  6. Network mapping

    1. For VPC, select the service provider VPC. Only VPCs with an internet gateway are available for selection.

    2. For Mappings, select all of the Availability Zones in which you launched security appliance instances, and the corresponding public subnets.

  7. IP listener routing

  8. For Default action, select a target group to forward traffic to. If you don't have a default target group, create a target group first. Only target groups with GENEVE protocol are available for use with the Gateway Load Balancer.

  9. Tag and create

    1. Add an optional tag to categorize your load balancer. Tag keys must be unique for each load balancer. Allowed characters are letters, spaces, numbers (in UTF-8), and the following special characters: + - = . _ : / @. Do not use leading or trailing spaces. Tag values are case-sensitive. For more information, see Update tags.

    2. Review your configuration, and choose Create load balancer. A few default attributes are applied to your load balancer during creation. You can view and edit them after creating the load balancer.

Important next steps

After creating your load balancer, verify that your EC2 instances have passed the initial health check. To test your load balancer, you must create a Gateway Load Balancer endpoint and update your route table to make the Gateway Load Balancer endpoint the next hop. These configurations are set within the Amazon VPC console. For more information, see Step 2: Create a Gateway Load Balancer endpoint and Step 3: Configure routing in the Getting started with Gateway Load Balancers section.