If an Elastic Compute Service (ECS) instance in the classic network or in a virtual private cloud (VPC) is assigned a public IP address, you can change the IP address within 6 hours after the instance is created.
Prerequisites
The ECS instance whose public IP address you want to change meets the following requirements:
- The instance is in the Stopped (
Stopped
) state.Note If the billing method of an instance 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 is assigned a public IP address.
- 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 an instance that is not
assigned a public IP address. 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:
- Apply for and associate an elastic IP address (EIP) with the instance. For more information, see Apply for an EIP of EIP documentation.
- Modify the public bandwidth of the instance to allocate a system-assigned public IP address. For information about how to perform this operation on subscription instances, see Overview of instance upgrade and downgrade. For information about how to perform this operation on pay-as-you-go instances, see Modify the bandwidth configurations of pay-as-you-go instances.