Question 521 · 548 in bank
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?
Show answer
Answer: A
Explanation
This is the correct approach. The instance metadata includes details such as the instance's public IPv4 address. The application can make a request to this URL, specifically to http://169.254.169.254/latest/meta-data/public-ipv4, to retrieve the public IPv4 address of the instance.
Source: Adapted from community discussion — SerialiDr