title: aws map between availability zone and zone name
body: <p>From aws doc :</p>
  <p>An Availability Zone is represented by a Region code followed by a letter identifier; for example, us-east-1a. To ensure that resources are distributed across the Availability Zones for a Region, we independently map Availability Zones to names for each AWS account. For example, the Availability Zone us-east-1a for your AWS account might not be the same location as us-east-1a for another AWS account.</p>
  <p>To coordinate Availability Zones across accounts, you must use the AZ ID, which is a unique and consistent identifier for an Availability Zone. For example, use1-az1 is an AZ ID for the us-east-1 Region and it has the same location in every AWS account.</p>
  <p>SO I have 2 accounts where I wanted to check this and I got the same output in both the accounts</p>
  <pre><code>aws ec2 describe-availability-zones --region us-west-2
  {
      &quot;AvailabilityZones&quot;: [
          {
              &quot;State&quot;: &quot;available&quot;, 
              &quot;ZoneName&quot;: &quot;us-west-2a&quot;, 
              &quot;Messages&quot;: [], 
              &quot;ZoneId&quot;: &quot;usw2-az1&quot;, 
              &quot;RegionName&quot;: &quot;us-west-2&quot;
          }, 
          {
              &quot;State&quot;: &quot;available&quot;, 
              &quot;ZoneName&quot;: &quot;us-west-2b&quot;, 
              &quot;Messages&quot;: [], 
              &quot;ZoneId&quot;: &quot;usw2-az2&quot;, 
              &quot;RegionName&quot;: &quot;us-west-2&quot;
          }, 
          {
              &quot;State&quot;: &quot;available&quot;, 
              &quot;ZoneName&quot;: &quot;us-west-2c&quot;, 
              &quot;Messages&quot;: [], 
              &quot;ZoneId&quot;: &quot;usw2-az3&quot;, 
              &quot;RegionName&quot;: &quot;us-west-2&quot;
          }, 
          {
              &quot;State&quot;: &quot;available&quot;, 
              &quot;ZoneName&quot;: &quot;us-west-2d&quot;, 
              &quot;Messages&quot;: [], 
              &quot;ZoneId&quot;: &quot;usw2-az4&quot;, 
              &quot;RegionName&quot;: &quot;us-west-2&quot;
          }
      ]
  }
  </code></pre>
  <p>So how do I verify if I create 2 resources in both accounts and chooses us-west-2a for both of them they are not created in the same location because both of them map to  usw2-az1</p>
  <p>I am sure I am missing something fundamental</p>
  <p>Thanks
  Kumar</p>