Skip to content
Advertisement

Does AWS Public IP addresses get issued per Network interface or per EC2 instance? [closed]

Lets say I have a CentOS server running on AWS. When I deployed it, I got a public IP t which I can connect to from my other systems, and a Private IP on that server that shows up if I do ifconfig, which is not accessible by systems outside that VPC.

So if I add another network interface, will that create another Public IP for that instance or there can only be 1 Public IP per instance?

If so, how do we get to decide on what interface we want to route the traffic via? Does AWS take away this capability from the users? (I tried understanding Elastic IP’s but having a hard time, if the answer lies in there I will try to read more)

Advertisement

Answer

Here is the documentation you need to read. You can attach more than one Elastic Network Interface to an EC2 instance. Each ENI can have a public IP address. That public IP address can optionally be an Elastic IP address.

Regarding how you decide what interface to route traffic to, that’s entirely up to you. You would generally point specific DNS records to specific public IP addresses.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement