All Products
Search
Document Center

Elastic Compute Service:Retain and reuse an ENI

Last Updated:Feb 28, 2026

When you release an Elastic Compute Service (ECS) instance, all attached Elastic Network Interfaces (ENIs) -- both primary and secondary -- are released by default. To preserve an ENI and its associated resources (private IP addresses, IPv6 addresses, Elastic IP Address (EIP) associations, security group memberships, and route table entries), disable Delete on instance release during instance creation or at any time afterward.

How it works

Each attached ENI is either released or retained based on its Delete on instance release setting:

ResourceReleased with the instanceRetained after instance release
Private IPv4 addresses and IPv4 prefixesReleasedRetained
Private IPv6 addresses, IPv6 prefixes, and IPv6 Internet bandwidthReleasedRetained
Elastic IP Address (EIP)Dissociated (the EIP must be manually released or attached to another resource)Attachment retained
Security groupDissociated (related security group rules are not automatically deleted)Association retained
Virtual Private Cloud (VPC) route table that points to the ENIDeletedRetained
A retained primary ENI becomes a secondary ENI. When you create a new instance, you can assign this ENI as the primary ENI of that instance.

Region availability for primary ENI retention

Secondary ENIs can be retained in all regions. Primary ENI retention is available only in the following regions.

Supported regions for primary ENI retention

AreaRegion nameRegion ID
Asia-Pacific - ChinaChina (Ulanqab)cn-wulanchabu
China (Shenzhen)cn-shenzhen
China (Guangzhou)cn-guangzhou
China (Chengdu)cn-chengdu
China (Hong Kong)cn-hongkong
China (Hohhot)cn-huhehaote
China (Zhangjiakou)cn-zhangjiakou
China (Hangzhou)cn-hangzhou
China (Qingdao)cn-qingdao
China (Beijing)cn-beijing
China (Shanghai)cn-shanghai
China (Heyuan)cn-heyuan
Asia-Pacific - OtherSingaporeap-southeast-1
Malaysia (Kuala Lumpur)ap-southeast-3
Indonesia (Jakarta)ap-southeast-5
Philippines (Manila)ap-southeast-6
Thailand (Bangkok)ap-southeast-7
Japan (Tokyo)ap-northeast-1
South Korea (Seoul)ap-northeast-2
Europe & AmericasUS (Silicon Valley)us-west-1
Germany (Frankfurt)eu-central-1
UK (London)eu-west-1
US (Virginia)us-east-1

Set the release behavior of an ENI

Console

  1. Find the target ENI using one of the following methods:

    • Go to the Instances page. Click the instance ID to open the instance details page, click the ENIs tab, and locate the ENI.

    • Go to the Elastic Network Interfaces page and locate the ENI directly.

  2. In the Instance column, enable or disable Delete on instance release to control whether the ENI is released with the instance.

API

APIParameterDescription
CreateNetworkInterfaceDeleteOnReleaseSet the release behavior when creating an ENI.
ModifyNetworkInterfaceAttributeDeleteOnReleaseUpdate the release behavior of an existing ENI.
DescribeNetworkInterfaceAttributeDeleteOnReleaseQuery the current release behavior.

Reuse a retained ENI

After an instance is released, retained ENIs remain available in the same zone. Attach a retained ENI to another instance using one of the following methods: