If the instances have been stopped in AWS, then the public IP gets released.
AWS releases your instance's public IP address when it is stopped, hibernated, or terminated.
Your stopped or hibernated instances will receive a new public IP address when they are restarted.
For more information, see: