- A primary private IPv4 address from the subnet CIDR.
- Optional IPv6 addresses.
- One or more secondary private IPv4 addresses.
- Optional association with an Elastic IP (EIP) or public IP.
- A unique MAC address.
- Configuration controls such as the source/destination check flag.
- Security groups (the interface-level firewall).
The primary ENI (eth0) is created with the instance and cannot be detached from that instance. It is automatically deleted when the instance is terminated.
Primary ENI vs. Secondary ENIs
Primary ENI (eth0)- Automatically created at instance launch and bound to the lifecycle of that instance.
- Receives the subnet-assigned primary private IPv4 and, if enabled, a public IP at launch.
- Cannot be detached.
- Can be created independently and attached/detached to instances in the same AZ.
- Each has a primary private IPv4 and can hold additional secondary IPs and IPv6 addresses.
- Can have different security groups from eth0, enabling separation of traffic (management, application, multi-NIC appliances).
- Useful for routing, HA configurations, and moving network identities between instances.
- ENIs are AZ-scoped — you cannot attach an ENI to an instance in a different Availability Zone.
- Secondary ENIs persist until explicitly deleted and can be reattached across instances in the same AZ.

Public IPs and Elastic IPs (EIPs)
When a subnet is configured to auto-assign public IPv4 addresses, the primary ENI will receive a public IP at instance launch. If you require a stable, portable public IP that can move with the ENI, use an Elastic IP (EIP). An EIP associated with an ENI remains attached to the ENI when you detach and reattach that ENI to another instance (in the same AZ), preserving the network identity without changing instance configuration.
Quick AWS CLI examples
Create an ENI in a subnet:ENI behavior and capabilities — at a glance
VPC Flow Logs can capture ENI traffic metadata for monitoring and security auditing; send logs to CloudWatch Logs or Amazon S3:
- VPC Flow Logs: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html
- CloudWatch Logs: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html
- Amazon S3: https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html
Best practices and common use cases
- Use separate ENIs for management and data traffic to isolate security groups and routing.
- Attach secondary ENIs to implement high-availability IP failover (move EIP/ENI between instances).
- Disable source/destination checks on ENIs when using the instance as a router/NAT appliance.
- Apply least-privilege security groups per ENI to minimize blast radius.
- Use ENIs to maintain network identity during instance replacement or autoscaling lifecycle operations (move the ENI to a replacement instance where appropriate).
References and further reading
- ENI documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html
- VPC overview: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
- EC2 documentation: https://docs.aws.amazon.com/ec2/
- Elastic IP addresses: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
- Availability Zones: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html