English 日本語
INTERSTELLAR TECH BLOG

Using a static IP address with Amazon Elastic Load Balancing – Configuration with NLB

Previous Article: Using a static IP address with Amazon Elastic Load Balancing

Hi, I am Agata.

This time, we will try to use Network Load Balancer (NLB) among the methods of using a fixed IP address with Amazon Elastic Load Balancing that we discussed in the previous article.

Since it would be too long to describe all the necessary settings, we assume that the target Application Load Balancer for the NLB has already been created.

Allocate Elastic IP address

The first step is to assign an Elastic IP, which is a static IP to be configured in the NLB.

  1. Log in to the AWS Management Console.
  2. Open EC2.
  3. Open Elastic IPs from the left menu.
  4. Click Allocate Elastic IP address.
  5. Leave the default settings and click the “Allocate” button in the lower right corner. The IP address assigned at this time will be the static IP address set in the NLB.

Create Target Group

Then create a Target Group to be used by NLB.

  1. Open “Target Groups” from the left menu.
  2. Click on “Create target group”.
  3. Under “Choose a target type,” select Application Load Balancer.
  4. Enter the desired Target Group Name.
  5. For VPC, select the same VPC as that of ALB.
  6. Click the “Next” button.
  7. Select the ALB to be targeted by Application Load Balancer. Once selected, click “Create target group”.

Create NLB

Finally, create NLB.

  1. Open Load Balancers from the left menu.
  2. Click on the blue button “Create Load Balancer” at the top.
  3. Under “Select load balancer type,” click the “Create” button under Network Load Balancer.
  4. Under VPC in Network Mapping, select the VPC where you want to deploy the NLB.
  5. Select the Availability Zone in the Mappings section of the Network Mapping, and check the Availability Zone checkbox to display the Subnet and IPv4 settings. The following is a brief description of the system. For IPv4 settings, select “Use an Elastic IP address” and select the Elastic IP set above.
  6. In Listeners and routing, set Listener, and for Default action, select the target group set above.
  7. Click on “Create load balancer”.

This completes the setup.

In this case, the settings were made on the assumption that ALB is used, but if you do not need the functions of ALB, you can also directly set instances, etc., as target groups from NLB.

PAGE TOP