An elastic network interface (ENI) is a logical virtual network card in an Amazon Virtual Private Cloud (VPC) that gives a compute resource its private IP addresses, security groups, MAC address and connection to a subnet. In cloud networking, the ENI is the basic attachment point between a workload and the VPC: every Amazon EC2 instance has at least one, and many managed services create their own ENIs to place endpoints inside a customer network.
Because an ENI exists as an independent resource with its own identity, it can be created, configured and moved between instances in the same Availability Zone while keeping its addresses and attributes. This independence makes it a building block for failover designs, multi-homed appliances and network segmentation in Amazon Web Services.
What an elastic network interface contains
An ENI is defined by a set of network attributes that travel with it when it moves. These attributes determine how traffic reaches the interface, which traffic is allowed and how the interface appears to the guest operating system.
The table below lists the main attributes and their effect on the attached workload.
| Attribute | Description | Practical effect |
|---|---|---|
| Primary private IPv4 address | Assigned from the subnet range at creation | Stable internal address for the interface lifetime |
| Secondary private IPv4 addresses | Additional addresses on the same interface | Hosting several services or containers on one card |
| Elastic IP address | Static public IPv4 mapped to a private address | Fixed public endpoint that survives instance changes |
| IPv6 addresses | One or more addresses from the subnet IPv6 range | Globally routable connectivity without NAT |
| Security groups | Stateful firewall rule sets bound to the ENI | Traffic filtering per interface, not per instance |
| MAC address | Fixed hardware address of the interface | Software licenses tied to a MAC keep working |
| Source/destination check | Flag that drops traffic not addressed to the ENI | Must be disabled for NAT or routing appliances |
A key point often missed is that security groups attach to the ENI, not to the instance itself. An instance with two interfaces can apply different rule sets to each, which allows separation of management and application traffic on the same host.
How ENIs attach to instances
Every EC2 instance has a primary network interface, shown as eth0 in Linux, which is created with the instance and cannot be detached. Additional ENIs, called secondary network interfaces, can be attached and detached as needed, and they keep their configuration when moved.
AWS distinguishes three attachment moments, which matter for automation and for guest operating system configuration.
| Mode | Instance state | Typical scenario |
|---|---|---|
| Hot attach | Instance is running | Failover to a standby instance without a restart |
| Warm attach | Instance is stopped | Reconfiguring an appliance during maintenance |
| Cold attach | Instance is being launched | Templates that always create a multi-homed host |
Two constraints govern every attachment. An ENI belongs to one subnet and therefore one Availability Zone, so it can only attach to instances in that zone. In addition, each instance type has a maximum number of interfaces and addresses per interface, which ranges from a few on small instances to dozens on large network-optimized types.
ENI types and service-managed interfaces
Not every ENI is created by a person. Many AWS services create requester-managed interfaces in customer subnets so that their endpoints receive private addresses and obey VPC routing and security groups. Recognizing these interfaces prevents accidental deletion attempts and explains why subnets sometimes run out of addresses.
| Kind | Created by | Purpose |
|---|---|---|
| Standard ENI | User or launch template | General instance networking |
| Requester-managed ENI | Services such as NAT gateways, VPC endpoints and Lambda | Placing a managed endpoint inside the VPC |
| Trunk ENI | Amazon ECS with interface trunking | Carrying many branch interfaces for awsvpc tasks |
| Elastic Fabric Adapter | User on supported instance types | Low-latency, OS-bypass traffic for high-performance computing |
Container platforms illustrate the scale effect. The Amazon VPC CNI plugin for Kubernetes assigns VPC addresses to pods through secondary addresses or prefix delegation, in which whole /28 IPv4 prefixes are attached to an ENI, greatly increasing pod density per node.
The Elastic Network Adapter, often abbreviated ENA, is a different concept: it is the driver and virtual hardware for enhanced networking, while the ENI is the logical interface that carries addresses and policies.
Design patterns that rely on ENIs
The movable nature of an ENI enables several well-established architecture patterns in cloud networking. Each pattern uses the fact that addresses, MAC address and security groups stay with the interface.
- Low-budget failover: a secondary ENI with a known address moves from a failed instance to a standby, so clients keep using the same IP.
- Management network separation: one interface serves application traffic while a second interface in a restricted subnet carries administrative access.
- Network and security appliances: firewalls and routers use several ENIs in different subnets, with source/destination checking disabled.
- License stability: software licensed to a MAC address keeps working when the interface moves to replacement hardware.
For observability, VPC flow logs record traffic per ENI, so the interface is also the unit of network monitoring and forensic analysis.
Limitations and common mistakes
Most problems with ENIs come from address capacity, zone boundaries and routing assumptions. The following table connects typical symptoms with their causes and remedies.
| Symptom | Cause | Fix |
|---|---|---|
| Pods or tasks fail to start | Subnet or per-instance address limit reached | Larger subnets, prefix delegation or bigger instance types |
| Second interface receives no reply traffic | Guest operating system routes all replies via eth0 | Configure policy-based routing in the guest |
| Appliance drops forwarded packets | Source/destination check still enabled | Disable the check on the appliance interfaces |
| Interface cannot attach to a new instance | Instance is in another Availability Zone | Create a new ENI in the target zone |
Another misconception is that a second ENI doubles network bandwidth. Bandwidth is set by the instance type, so additional interfaces add segmentation and addresses, not throughput. Multiple ENIs also do not provide cross-zone high availability, which still requires load balancers or DNS-based failover.
The simple explanation
An elastic network interface is like a network card for a virtual server, except that it exists only in software. It holds the address other machines use to reach the server and the rules about who may connect.
Because it is separate from the server, it can be unplugged and plugged into another server in the same data center area, taking its address and rules along. The key takeaway is that the network identity belongs to the interface, so moving the interface moves the identity.
How it is used in practice
A logistics company runs a legacy order-processing application on a single EC2 instance in one Availability Zone. Partner systems connect to a fixed private IP address that is hard-coded in their configurations, and the software license is bound to a MAC address.
The operations team creates a secondary ENI with the address 10.20.1.50, attaches it to the active instance and keeps a stopped standby instance in the same subnet. A health check script detects failure, detaches the interface and hot attaches it to the standby, which is then started. A separate interface in a management subnet allows administrator access through a bastion host with stricter security group rules.
During a real hardware failure, partner connections recover in about two minutes without any configuration change on their side, and the license remains valid because the MAC address moved with the interface.