Sometimes you might not have access to the AWS Console or just have direct access to an EC2 instance and would like to find out more information on the EC2 instance itself and where it’s hosted in AWS Cloud. The quickest way to fetch or retrieve EC2 instance metadata from within a running EC2 instance is to log in and run the command: In this blog post, we’ll dive deeper into a couple of different…

Source