If an Elastic Compute Service (ECS) instance in the classic network or in a virtual private cloud (VPC) has been assigned a public IP address, you can change the public IP address of the instance within 6 hours after the instance is created.

Prerequisites

The ECS instance whose public IP address you want to change must meet the following conditions:
  • The instance is in the Stopped (Stopped) state.
    Note If the billing method of an instances is pay-as-you-go and the network type of the instance is VPC, you must enable the standard mode for the instance when you stop the instance. If you enable the economical mode for the instance, the Change Public IP Address option is not displayed in the ECS console.
  • The instance has a public IP address assigned.
  • The instance is less than 6 hours old.

Background information

The following limits apply when you change the public IP address of an ECS instance:
  • The public IP address of the instance can be changed up to three times.
  • The operations described in this topic are not applicable to the instance that has no public IP address assigned. In this case, you can use one of the following methods to assign a public IP address (system-assigned public IP address or elastic IP address) to the instance:

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 instance whose public IP address you want to change. Choose More > Network and Security Group > Change Public IP Address.
    Change Public IP Address
  5. In the Change Public IP Address dialog box, click Start Now.
    If the public IP address of the instance is changed, a new public IP address is displayed in the dialog box.
  6. Click OK.