Find out the instance id from an ec2 machine

How to find out the instance-id on an ec2 server?Let’s do it, just two step

First, on ubuntu ec2 instance

sudo apt-get install cloud-utils

Second, run the following command

You can get most of the metadata associated with the instance this way



Leave a Reply

Your email address will not be published. Required fields are marked *