AWS Elastic Network Interfaces (ENIs), and Use cases for ENIs.
In traditional IT infrastructure, we use to have Network interface card attached to our server and it used to look like below
In AWS, we have Virtual Network Interface known as Elastic Network Interface (ENI). When you run an EC2 instance, a default Network Interface eth0 is assigned to it. It handles all traffic sent and received from an instance.
You can assign Security Groups to an ENI. Lets go through some use cases for an ENI.
Lets say, you have two subnets, public and management, now you do not want to expose anyone to access and manage public subnet EC2 using ssh, so for this, in the security group of public EC2, you only allow TCP port 80. Next, you will add a network interface to your management subnet.
Once your interface is created, next task will be to attach it to an EC2 instance.
Once this is done, you will see two Network interfaces attached to your EC2 i.e. one is Default eth0 and second one is Management eth1
This will enable access for managing a public subnet’s ec2 using a private subnet’s ec2 that is connected using a VPN.
Architecture will roughly look like below.
Feel free to post comments or you can email me on ujjwalsoni85@gmail.com