If an ECS instance needs to provide external services, you can allocate a public IP for it when creating the ECS instance.
A public IP will be allocated when the selected Network Bandwidth Peak is larger than 0, while Elastic IP (EIP) can purchase and possess independently.
Here is the comparison table of Elastic IP (EIP) and Public IP
|Elastic IP (EIP)||Public IP|
|Support Network Environment||VPC||Classic Network|
|Can be purchase separately||Yes||No|
|Dynamically binding and unbinding to and from ECS instances||Yes||No|
|IP assignment||EIP can be purchased separately||automatically assigned when an instance is created or when the 0 Mbps bandwidth is upgraded|
|Release IP||Yes||When the ECS instance is released|
|Viewed on the NIC||No||Yes|
|Number of IP per instance||1||1|