AWS Certified Developer Associate DVA-C01 – Question068

A developer deployed an application to an Amazon EC2 instance. The application needs to know the public IPv4 address of the instance.
How can the application find this information?

A.
Query the instance metadata from http://169.254.169.254/latest/meta-data/ .
B. Query the instance user data from http://169.254.169.254/latest/user-data/ .
C. Query the Amazon Machine Image (AMI) information from http://169.254.169.254/latest/meta-data/ami/ .
D. Check the hosts file of the operating system.

Correct Answer: A