Purpose of using multiple AWS Elastic network interfaces

1k Views Asked by At

I am reading about AWS Elastic network interfaces. Can someone tell me a good practical example of creating multiple Network Interfaces ?

Based on what I understood:

Assume there's an application that is in EC2. This application has several user functions and admin functions. We create 2 subnets, 1 for users and another for admins. We can create another Elastic network interfaces for admin users to access EC2. Is my understanding correct ? what are some common use cases for ENIs?

2

There are 2 best solutions below

3
Dennis Traub On BEST ANSWER

Yes, the use case you describe is one of the common reasons to have multiple ENIs on a single instance.

There was a similar question on ServerFault with some good answers. It’s not specific to AWS, but the reasoning can be applied here as well: https://serverfault.com/questions/129935/is-there-any-reason-to-have-2-nics-on-a-server

0
Marcin On

A very common use case for using multiple ENIs is in ECS and awsvpc network mode.

The awsvpc network mode requires extra ENIs on your instances to use. This:

simplifies container networking and gives you more control over how containerized applications communicate with each other and other services within your VPCs.

awsvpc network mode is also required when using Fargate launch type, but that is managed by AWS. If you want to use the awsvpc mode on your container instances (EC2 Launch type) you will have to ensure that your instance can accommodate the extra ENI (one per task) with proper security groups.

There are also AWS managed ENIs that are created in your VPC. Examples are VPC Interface endpoints and lambda VPC integration.