Actually, When you stop/start your instance, the IP address will change. If you reboot the instance, it will keep the same IP addresses. Unfortunately, it is not possible for us to reassign the address to your instance as that address would have been released back into the pool used by other EC2 instances.
If you want to avoid this issue in the future, depending on your needs:
- If you only need a fixed public IP address, you can assign an Elastic IP address to your instance.
- If you need both public and private IP addresses to remain the same throughout the lifetime of the instance, you can launch your instance in VPC instead. The private IP address assigned to an instance in VPC remains with the instance through to termination.
To learn more, see the aws documentation to assign elastic ip.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…