Network Interfaces (ENI) for Beginners

Beginner
9 min read
Updated: Nov 2026
4 steps
Console walkthrough

What Is a Network Interface?

An elastic network interface (ENI) is a virtual network card inside your VPC. Your EC2 instance plugs into the network through it.

  • Private IPv4 (and optional IPv6) addresses live on the ENI.
  • Security groups attach to the ENI, not “to the AMI.”
  • Elastic IPs associate to a private IP on an ENI.
Beginner tip.

In the console this resource is simply called a network interface. Docs often say ENI for short.

In Simple Words

What problem does it solve?

Networking details (IPs, MAC, firewall rules) need a home. The ENI is that home, so you can move some of those settings with a secondary interface or remap an Elastic IP without rebuilding the whole instance.

Primary vs secondary

Every instance has a primary ENI you cannot detach. Secondary ENIs are optional extras in the same Availability Zone for advanced setups.

When should a beginner look at ENIs?

After launch and Elastic IP association, when you want to see where the public IP actually attaches—or before you release unused Elastic IPs.

Official docs.

Elastic network interfaces in the EC2 User Guide.

Words You Will See

WordPlain meaning
ENIElastic network interface—virtual NIC in a VPC
Primary ENIThe default interface created with the instance
Private IPv4Address inside the subnet; used for VPC traffic
Public / Elastic IPInternet-facing IPv4 mapped onto a private address on the ENI
Security groupFirewall rules attached to the interface
Same AZSecondary ENIs attach only to instances in that Availability Zone

What You Need First

Step-by-Step

Step 1 — Open Network Interfaces

  1. In EC2, under Network & Security, choose Network Interfaces.
  2. Or open your instance → Networking tab and follow the interface ID link.

How It Works

  1. Each instance lists at least one ENI (the primary).
  2. Interface IDs look like eni-….

Step 2 — Read Primary Private IP and Subnet

  1. Note the Primary private IPv4, subnet, and Availability Zone.
  2. Confirm the attachment status is in-use on your instance.

How It Works

  1. Private IP comes from the subnet CIDR.
  2. Public IPv4 (if any) is shown on the same ENI until stop/start changes ephemeral addresses.

Step 3 — See How Elastic IP Attaches

  1. If you associated an EIP, find it under the ENI’s addresses or the Elastic IP page.
  2. Remember: one EIP maps to one private IP on one ENI at a time.
Associate Elastic IP address in EC2 Actions menu
Amazon EC2

How It Works

  1. Associate on “Instance” is a shortcut that targets the primary ENI.
  2. Disassociate / release when the lab ends—see release unused Elastic IPs.

Step 4 — Confirm Security Groups on the ENI

  1. On the ENI detail page, open the security groups list.
  2. Edit rules as needed using the security groups guide.

How It Works

  1. Changing groups on the ENI changes what traffic can reach that interface.
  2. Multiple groups combine as allow lists.

Common Beginner Mistakes

Trying to detach the primary ENI

Only secondary interfaces can be detached and moved.

Wrong Availability Zone

Secondary ENIs must stay in the same AZ as the instance.

Ignoring idle Elastic IPs

An EIP on a detached/unused association can still bill—release when done.

Editing security groups on the wrong ENI

Multi-ENI instances can have different groups per interface.

Key Takeaways

  • ENI = virtual NIC holding IPs and security groups.
  • Primary ENI is permanent for the instance lifetime.
  • Elastic IPs bind to private IPs on an ENI.

One line: find the instance’s ENI to understand IPs, Elastic IP attachment, and security groups.

Frequently Asked Questions

A network interface (ENI) is a virtual network card in your VPC that holds private IPs, optional public or Elastic IPs, a MAC address, and security groups, and can attach to an EC2 instance in the same Availability Zone.
Every EC2 instance gets a primary ENI at launch. You cannot detach that primary interface from the instance.
An Elastic IP associates to a private IPv4 address on a network interface. Associating an EIP to an instance usually means attaching it to that instance’s ENI.
You can detach a secondary ENI and attach it to another instance in the same Availability Zone. The primary ENI stays with its instance.
Security groups attach to network interfaces. Traffic to the instance is filtered by the groups on its ENIs.
Usually no. Learn the primary ENI, Elastic IP association, and security groups first. Add secondary interfaces later for multi-homing or advanced networking.

Next: Release unused Elastic IPs

Clean up idle addresses so they stop billing and free quota.

Release Elastic IPs →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful