Reputation: 19
In my elastic beanstalk application, everything works fine. However, my client wants a static (elastic) IP for the application instead of the DNS that AWS provides. I cannot do a reverse lookup on the ELB DNS as the IP is not static.
This blog post states that I can attach a static IP to the NLB, but I cannot figure out how to accomplish this.
Upvotes: 1
Views: 2297
Reputation: 3506
It's common for security sensitive organisations to want to update their firewalls to communicate with third party services on the internet with Static IP Addresses.
When setting this up manually, you Create one or more EIPs (Static IP), then select those EIPs when creating a Network Load Balancer.
When you create an Elastic Beanstalk environment, you have the option to create a Classic, Application, or Network Load Balancer. Once it has been created you can't change it, so make sure that you have a Network Load Balancer. If your environment does not have a NLB already, I suggest creating a new environment that has an NLB, and switching the URL to this new environment.
However, when you create an Elastic Beanstalk Stack with an NLB, you don't have the option to select EIPs for the NLB it is about to create.
The good news is that looking in the AWS Console at EC2 > Network Interfaces, you can see the ENIs that have been created for the NLB, and those ENIs has been assigned Public IP Addresses (EIPs). These are Static Addresses for as long as the NLB exists. Unfortunately it seems that they are not customer owned EIPs, and you can't swap out ENIs or EIPs on the NLBs to reuse the IP Addresses.
If you rebuild the environment, those IP Addresses will change.
If you are feeling adventurous, there is an AWS Method of Creating an NLB in front on an ALB. This provides a Static IP (manually provisioning it) with an ALB (provisioned by EB in your case) with the benefits of Layer 7 Load Balancing. see here
Upvotes: 3