DEV Community

Aadit Unni
Aadit Unni

Posted on

Create an Elastic Network Interface - Multiple IPs on an EC2

[9/100] #100DaysOfCloud Today, I created an EC2 Instance and attached an Elastic Network Interface and an Elastic IP to get multiple IPs on an EC2.

Elastic Network Interface (ENI) :

  • An elastic network interface is a logical networking component in a VPC that represents a virtual network card.

  • Multiple ENI's can be attached to a single EC2 instance.

  • By default, it gives you a private IPv4 address, you can choose to attach an Elastic IP for a Public IPv4 address.

  • You can create and configure network interfaces and attach them to instances in the same Availability Zone

  • You can create a network interface, attach it to an instance, detach it from an instance, and attach it to another instance. When you move a network interface from one instance to another, network traffic is redirected to the new instance.

  • You will charged for an Elastic IP Address that is associated with a network interface but the network interface isn’t attached to a running instance.

  • You can attach and detach secondary interfaces (eth1-ethn) on an EC2 instance, but you can’t detach the eth0 interface.

You can try to create an EC2 Instance and attached a Elastic Network Interface and an Elastic IP to get multiple IPs on an EC2 yourself by following the steps from the link below :
GitHub

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay