This document describes how to obtain the public IP address through console, API, or Instance metadata.
The public IP address is mapped to the private IP address through NAT. If you view the network interface attributes from within the instance (such as by using commands such as
ipconfig (Windows)), the public IP address is not displayed. To obtain the public IP from within the instance, please see Obtaining a Public IP Address of the Instance Using Instance Metadata.
Please see DescribeInstances.
If the returned value is in the following structure, you can view the public IP address: