40976/how-to-get-the-instance-id-from-within-an-ec2-instanace
On Amazon Linux AMIs you can do:
$ ec2-metadata -i instance-id: i-1234567890abcdef0
A curl or wget to http://169.254.169.254/latest/meta-data/instance-id will ...READ MORE
For Amazon Linux AMIs you can use: $ ...READ MORE
There is one more way of finding ...READ MORE
Using AWS Management Console: Right-Click on the instance Instance ...READ MORE
For some reason, the pip install of ...READ MORE