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.
Prerequisites
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
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.
ImportantTo 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.
Background information
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.
NoteFor 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.
Limits
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.
Procedure
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.