You can use elastic network interfaces (ENIs) to deploy high-availability clusters and perform low-cost failover and fine-grained network management. This topic describes how to bind an ENI when you create an Elastic Compute Service (ECS) instance. You can also separately create an ENI and bind it to an existing instance.
The instance to which you want to bind an ENI is of an I/O optimized instance type and is in the Stopped or Running state.
Instances of specific instance types that are described in the following table can have secondary ENIs bound only when the instances are in the Stopped state.
Instance types for which instances must be in the Stopped state
The following table describes the instance types. For more information, see Overview of instance families.
s6, shared standard instance family
ecs.s6-c1m1.small, ecs.s6-c1m2.large, ecs.s6-c1m2.small, ecs.s6-c1m4.large, and ecs.s6-c1m4.small
t6, burstable instance family
ecs.t6-c1m1.large, ecs.t6-c1m2.large, ecs.t6-c1m4.large, ecs.t6-c2m1.large, and ecs.t6-c4m1.large
t5, burstable instance family
ecs.t5-c1m1.large, ecs.t5-c1m2.large, ecs.t5-c1m4.large, ecs.t5-lc1m1.small, ecs.t5-lc1m2.large, ecs.t5-lc1m2.small, ecs.t5-lc1m4.large, and ecs.t5-lc2m1.nano
Previous-generation shared instance families xn4, n4, mn4, and e4
ecs.n4.small and ecs.n4.large
ecs.mn4.small and ecs.mn4.large
ecs.e4.small and ecs.e4.large
If the instance was last started, restarted, or reactivated before April 1, 2018 and has remained in the Running state since then, you must restart the instance before you can bind ENIs to it.Important
To restart an ECS instance, you must use the ECS console or call the RebootInstance operation. You cannot restart an instance from within the operating system.
An ENI is created and is in the Available state. For more information, see Create an ENI.
The ENI must reside in the same virtual private cloud (VPC) and zone as the instance to which you want to bind the ENI.
Bind an ENI when you create an instance
When you create an instance in the ECS console, you can add an ENI to the instance. The ENI is automatically assigned an IP address and bound to the instance without additional operations. The instance can have two ENIs added during instance creation: a primary ENI and secondary ENI.Note
For specific instance types, you cannot bind secondary ENIs when you create instances. To bind secondary ENIs to instances of these instance types, wait until the instances are created. For more information, see Overview of instance families.
Create an ENI separately and bind it to an existing instance
If you did not bind ENIs to an instance when you created the instance and separately created one or more ENIs, bind the ENIs to the instance by using the ECS console or calling an API operation.
An ENI can be bound to only a single ECS instance at a time. However, an ECS instance can have multiple ENIs. For more information about the number of ENIs that is supported by each instance type, see Overview of instance families.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
Find an available secondary ENI and click Bind to Instance in the Actions column.
In the Bind to Instance dialog box, select an instance and click OK.
Refresh the ENI list. If the ENI is bound to the instance, Bound is displayed in the Status/Creation Time column corresponding to the ENI.
What to do next
For instances that use specific images, you may need to manually configure ENIs that are bound to the instances so that the ENIs can be identified by the instances. For more information, see Configure a secondary ENI.