notes-on-elastic-network-interfaces-enis-in-aws

Elastic Network Interfaces (ENIs) in AWS are a key component of Amazon EC2 instances, and they play a role in network connectivity and management.

  1. Definition: Elastic Network Interfaces (ENIs) are virtual network interface cards that you can attach to Amazon EC2 instances.
  2. Functionality: ENIs enable network connectivity for EC2 instances and are essential for various networking features.
  3. Attachment: You can attach multiple ENIs to an EC2 instance, each serving a different purpose.
  4. Primary ENI: Every EC2 instance is launched with a primary ENI that is created automatically.
  5. Additional ENIs: You can attach additional ENIs to an EC2 instance, up to the instance type’s limits.
  6. Use Cases: ENIs are used for various purposes, such as connecting to Virtual Private Clouds (VPCs), Elastic Load Balancers (ELBs), or Network Address Translation (NAT) gateways.
  7. MAC Address: Each ENI has its own unique MAC address.
  8. Private IP Addresses: ENIs can be assigned one or more private IP addresses from the associated subnet.
  9. Elastic IP Addresses: You can associate Elastic IP addresses with a specific ENI to make them persistent.
  10. Security Groups: ENIs can have their own security group rules to control inbound and outbound traffic.
  11. Network ACLs: They can also be associated with Network Access Control Lists (NACLs) for additional network security.
  12. Instance Termination: When an EC2 instance is terminated, all associated ENIs are automatically detached.
  13. ENI Types: There are two types of ENIs: standard and elastic fabric adapter (EFA) ENIs.
  14. Standard ENIs: Standard ENIs are used for general-purpose networking requirements.
  15. Elastic Fabric Adapter (EFA) ENIs: EFA ENIs are specialized for high-performance computing (HPC) and tightly coupled, low-latency workloads.
  16. Warm Pools: You can create warm pools of EC2 instances with pre-attached ENIs for faster scaling.
  17. ENI Limitations: The number of ENIs you can attach to an EC2 instance depends on the instance type and the AWS region.
  18. ENI Limit Increases: You can request a limit increase for ENIs if your use case requires more than the default limit.
  19. ENI Detach/Attach: You can detach and attach ENIs to running instances without stopping or rebooting them.
  20. Elastic Network Adapter (ENA): Many EC2 instances are launched with ENAs, which provide enhanced networking capabilities.
  21. Bonds and Bonding Modes: You can bond multiple ENIs for redundancy and increased network throughput using bonding modes like active-passive or active-active.
  22. Cross-VPC Attachments: You can attach an ENI from one VPC to an EC2 instance in another VPC within the same region using VPC Peering or Transit Gateway.
  23. ENI Monitoring: You can monitor the network performance of ENIs using Amazon CloudWatch metrics.
  24. ENI Lifecycle Hooks: You can use EC2 Auto Scaling lifecycle hooks to manage ENIs during scaling events.
  25. EC2 Launch Templates: ENIs can be specified in EC2 launch templates for consistent ENI attachment during instance creation.
  26. Resource Tagging: You can assign tags to ENIs for better resource management and tracking.
  27. Security Group Rules: ENIs can be a part of multiple security groups, allowing you to define rules more granularly.
  28. ENI Elastic Inference: ENIs can be used to attach Elastic Inference accelerators to EC2 instances for AI/ML workloads.
  29. ENI Private DNS: ENIs support private DNS resolution, allowing instances to resolve private DNS names.
  30. ENI Limits for Transit Gateway: When using Transit Gateway, there are specific limits on the number of ENIs that can be attached to instances in a VPC attachment.

Elastic Network Interfaces are a crucial part of configuring and managing the network connectivity of your EC2 instances in AWS, and understanding their capabilities is important for building scalable and secure architectures.

By Abhishek K.

Author is a Architect by profession. This blog is to share his experience and give back to the community what he learned throughout his career.