Last active
December 19, 2015 23:18
-
-
Save mredar/6033517 to your computer and use it in GitHub Desktop.
IP addresses for ec2 instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To determine your instance's IP addresses using instance metadata | |
Connect to the instance. | |
Use the following command to access the private IP address: | |
GET http://169.254.169.254/latest/meta-data/local-ipv4 | |
Use the following command to access the public IP address: | |
GET http://169.254.169.254/latest/meta-data/public-ipv4 | |
FROM: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#using-instance-addressing-common |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment