AWS: Assign an Elastic IP to an ELB using Global Accelerator

Yossi Silberhaft
3 min readJan 24, 2021

--

Example — ELB behind Global Accelerator with EIPs

Have you ever needed to assign an Elastic (static) IP to an Elastic Load Balancer? Well, now, with AWS Global Accelerator it is possible.

What is AWS Global Accelerator?

AWS Global Accelerator is a networking service that sends your user’s traffic through Amazon Web Service’s global network infrastructure, improving your internet user performance by up to 60%.

With Global Accelerator, you are provided two global static customer facing IPs to simplify traffic management. On the back end, add or remove your AWS application origins, such as Network Load Balancers, Application Load Balancers, Elastic IPs, and EC2 Instances, without making user facing changes. To mitigate endpoint failure, Global Accelerator automatically re-routes your traffic to your nearest healthy available endpoint.

Why assign and EIP to an ELB?

The main reason for associating an EIP to any sort of Elastic Load Balancer whether an Application Load Balancer, Networking Load Balancer or even an EC2 instance is when defining a route rule in a subnet route table. This is useful when you want to direct traffic to the ALB through a specific target like a NAT Gateway for instance.

How to set it up

  1. Navigate to the Global Accelerator service:
Find global accelerator in the search bar

2. Click “Create Accelerator”

Global Accelerator Home Page

3. Give your accelerator a name and click Next:

Define the Accelerator name

4. Define the Listeners by choosing the Ports and Protocol that you need. You can add multiple listeners. Click Next

Add listeners

5. Define your Endpoint Group, you can have multiple groups for different Load Balancers, EC2 instances or Elastic IP’s. Click Next

Add endpoint groups

6. Add endpoints. When choosing Application Load Balancer the Endpoint drop down will be automatically populated. Select your ALB, click Create accelerator and you are done

Add endpoint and Create accelerator

The accelerator takes a few minutes to be created. Once deployed you will see the Deployed status and the Static IP addresses. You now have 2 Elastic IP addresses that you can use to reach your ALB.

Thank you!

Want to connect? Reach out to me on LinkedIn ⭐️

--

--

Yossi Silberhaft

Full Stack and Infrastructure Team Lead @ironSource 4+ years experience in Server and Client side development as well as AWS Cloud Services and Infrastructure.