Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

Is there a way to look up the region of an instance from within the instance?

1 Answer

0 votes
by (44.4k points)

Use this:

EC2_AVAIL_ZONE=`curl -s`

EC2_REGION="`echo \"$EC2_AVAIL_ZONE\" | sed 's/[a-z]$//'`"

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories