Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to assign Elastic IP to Application Load Balancer in AWS?

I created an Application Load Balancer in AWS.

How can I assign an Elastic IP address to the application load balancer? I didn't find any IP address in the load balancer description.

like image 248
Srikanth Bonagiri Avatar asked Mar 19 '19 08:03

Srikanth Bonagiri


People also ask

Can I assign Elastic IP to application load balancer?

You can't assign a static IP address to an Application Load Balancer.

Does ELB need Elastic IP?

The ELB does not use your elastic IPs, even if they are present. An ELB deployment provides you with a hostname that is used to route inbound requests, using either a CNAME or a Route 53 Alias DNS record.

How do you allocate an elastic IP address?

To allocate an Elastic IP address Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Network & Security, Elastic IPs. Choose Allocate Elastic IP address.

Does ALB has a Elastic IP?

Unfortunately, ALBs do not support this feature and it is unlikely they will in the near future. Today, the only way to achieve static IP addresses for your application behind an ALB is to add another layer in between the client and your ALB which does have a static IP address, and then forward requests to your ALB.


2 Answers

An Application Load Balancer cannot be assigned an Elastic IP address (static IP address).

However, a Network Load Balancer can be assigned one Elastic IP address for each Availability Zone it uses.

If you do not wish to use a Network Load Balancer, you can combine the two by putting the Network Load Balancer in front of the Application Load Balancer:

NLB in front of ALB

See: Using static IP addresses for Application Load Balancers | Networking & Content Delivery

like image 193
John Rotenstein Avatar answered Oct 01 '22 04:10

John Rotenstein


You can now get global static IPs for your Application Load Balancer directly from the Load Balancer Management Console, either in the creation wizard or in the Integrated services tab. See this blog post.

like image 36
Marco Cagna Avatar answered Oct 01 '22 02:10

Marco Cagna