This topic describes how to convert the public IP address of an ECS instance in a VPC to an Elastic IP Address (EIP). After conversion, the public IP address is retained. You can keep the public IP address bound to the instance, or bind it to another instance. Converting the public IP address does not affect public access to your ECS instance, and does not cause transient traffic interruptions.

Prerequisites

Before converting a public IP address to an EIP, make sure the following requirements are met:
  • The ECS instance has been assigned a public IP address.
  • If the ECS instance is a subscription instance, you cannot convert the address within 24 hours prior to instance expiration.
  • If the ECS instance is a pay-as-you-go instance, your account must not have any overdue payments.
  • If the instance type of the ECS instance has been changed, wait until the change takes effect.
  • You have stopped the ECS instance or the ECS instance is in the Running state. For more information, see Start or stop an instance.

Background information

After the public IP address is converted to an EIP:
  • The billing method of public bandwidth remains unchanged.
  • The EIP is billed separately. For more information about EIP billing, see EIP pricing. You can go to the Billing Management page, select Usage Records, and select Elastic IP to export EIP usage records.

This section describes how to convert the public IP address of an ECS instance in a VPC to an EIP by using the ECS console. You can also convert the IP address by calling the ConvertNatPublicIpToEip operation. To call this operation, use SDK 4.3.0 or later. Download the latest SDK.

Procedure

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the target instance with the VPC network type, and then choose More > Network and Security Group > Convert to EIP from the Actions column.
  5. In the dialog box that appears, confirm the information, and click OK.
  6. Refresh the instance list.

Result

After the public IP address is converted to an EIP, the original IP address is followed by (EIP).

You can click the EIP to go to the EIP console to manage the EIP.

What to do next

After the public IP address is converted to an EIP, you can: