This topic describes how to convert the public IP address of an Elastic Compute Service (ECS) instance in a virtual private cloud (VPC) to an elastic IP address (EIP). After the conversion, you can disassociate the EIP from the instance and associate the EIP with the instance again or with another instance at any time. Address conversion does not affect the access from the Internet to your instance or cause transient network outage.
- The instance is assigned a public IP address.
- If the instance is a pay-as-you-go instance, you have no overdue payments within your account.
- If the instance is a subscription instance, the instance has at least 24 hours remaining in its validity period.
- If the instance is a subscription instance, the instance uses the pay-by-traffic billing method for network usage. You can change the billing method for network usage from pay-by-bandwidth to pay-by-traffic by upgrading or downgrading instance configurations. For more information, see Overview of instance upgrade and downgrade.
- If the instance type has been changed, wait until the change takes effect before you convert the address.
- The instance is in the Running or Stopped state.
- The billing method for network usage remains unchanged.
- The EIP is separately billed, and separate bills are generated. For more information about EIP billing, see Billing overview. You can go to the Billing Management console. In the left-side navigation pane, click Usage Records. On the Usage Records page, select Elastic IP from the Product drop-down list to export EIP usage records.
This section describes how to convert the public IP address of an instance in a VPC to an EIP by using the ECS console. You can also convert the public IP address by calling the ConvertNatPublicIpToEip operation. To call this operation, use SDKs 4.3.0 or later. For more information, see SDK overview.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Find the instance whose network type is VPC, and then choose in the Actions column.
- In the dialog box that appears, confirm the information and click OK.
- Refresh the instance list.
After the public IP address is converted to an EIP, the public IP address is marked by (Elastic).
You can click the EIP to go to the Elastic IP Addresses page in the VPC console to manage the EIP.
What to do next
- Disassociate the EIP from the instance and then release the EIP or associate the EIP with a different instance. For more information, see Disassociate an EIP from a cloud resource.
- Add the EIP to an EIP bandwidth plan to reduce costs. For more information, see Associate an EIP with an EIP bandwidth plan, Select a product to gain access to the Internet, and Reduce the costs of data transfer over the Internet.