On reboot, the IP address of an amazon instance changes. How to find the new IP address using java API?
You can use the ec2 describe-instance command that requests and returns a description of instances including their IP Public address.