I repeat the list of running instances returned by the DescribeInstances API. I would like to know how I can get the availability zone for each of these instances.
Access to the access zone can be obtained using:
instance.getPlacement().getAvailabilityZone();
Surprised no one has posted this yet, this is the best, fastest and easiest way to do this AFAIK.
curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone
, API, - IP . IP ( AWS ).
API:
I did this as follows: 1. Use the API to get the currently available zones. 2. Scroll through the returned zones, set the filter on the DescribeInstances foreach of them and get information about the instance.
Source: https://habr.com/ru/post/1779341/More articles:Integration of MSTest with cruise control system for several projects - mstestWorkflow as a system for changing code flow - c #kSOAP2 output / org.xmlpull.v1.xmlpullparserexception expected start_tag - androiddo ccnet self test - cruisecontrol.nethttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1779340/ignore-all-changes-to-a-versioned-folder-in-svn-without-deleting-from-repo&usg=ALkJrhiuLwriNar77bBIQLf1qKcWSu5UEAextend all node in SQL Reporting Service? - sqlRegEx for value Range 1 to 365 - regexImplement SHA1 algorithm in flex - flexConvert NSDate from 12 hours to 24 hours - iosFrom the current locale string on iphone sdk - objective-cAll Articles