How to quickly find the AZ of an EC2 while using SSH on the box

Well the title is a mouthful but long and the short of it is I needed a quick way to figure out what AZ a specific box was running on so I can update the Linux software running on it via the UI Console… and I have a bunch of EC2 instances I run across AWS full set of AZ. So how do you find it? Simple… using curl & hitting a unique IP address provided by AWS.

curl http://169.254.169.254/latest/meta-data/placement/availability-zone

That's it ... what you get back will tell you where your EC2 is located... and in the case of the one I was trying to find ... ap-northeast-1