If you are just starting with AWS, you may not know that Amazon Linux images have a special command for confirming most useful information about EC2 instance: ec2-metadata.
If you just run the command without options, you’ll get to see all the available meta info.
Here’s an example from the vps2.unixtutorial.org instance (give me a shout if you want access to it for learning Linux!):
There are also lots of command line options to show individual fields from this output.
This will only work if you actually have external IPv4 address mapped to your instance.
Are you interested in more AWS related posts and Unix tutorials? Please let me know!