skip to Main Content

I am still learning AWS so please bear with me. I tried searching google but couldnt get any precise answer to my question. I am a CCIE myself so networking is not new to me.

When we create new EC2 instance in default VPC every instance gets a Public IP and Private IP. Private IP is assigned to the ENI. Perfect. Where is the public ip assigned? how its done? i think it should be NAT behind the scenes right? or else how can you assign a Public IP without actually assigning it somewhere.

Please confirm my doubt

I tried to find the answer in aws documentation but couldnt find it

2

Answers


  1. Amazon has it’s own pool of public ip addresses, which gets assigned to your instances based on where you deployed them.

    A public IP address is assigned to your instance from Amazon’s pool of public IPv4 addresses, and is not associated with your AWS account. When a public IP address is disassociated from your instance, it is released back into the public IPv4 address pool, and you cannot reuse it.

    See here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html

    I’m not sure if you’re looking for a more in-depth answer.

    But something to be aware of, is that AWS will start charging you for all active and waiting public ip addresses, due to the shortage.

    See announcement: https://aws.amazon.com/blogs/aws/new-aws-public-ipv4-address-charge-public-ip-insights/

    Login or Signup to reply.
  2. Behind the scenes, the public ip is VIP that is mapped to the private ip address using static nat.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search