Files
nexus/wiki/concepts/Availability-Zone-ID.md
2026-04-29 00:02:51 +08:00

2.3 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
Availability-Zone-ID concept
AWS
VPC
Networking
Multi-Account
ctp-topic-45-automatic-ip-address-allocation-with-ipam
ctp-topic-61-workload-vpc-provision-with-ipam-automation
2026-04-24

Availability-Zone-ID

AWS 可用区标识符(如 ap-southeast-1aap-southeast-1b),用于在多账号 AWS 环境中精确定位物理可用区位置。相比 AZ 名称AZ ID 能唯一标识跨账号的同一物理位置。

Problem: AZ Name Inconsistency

不同 AWS 账号对同一物理可用区的名称可能不同:

账号 A 账号 B 物理位置AZ ID
ap-southeast-1a ap-southeast-1b apse1-az1
ap-southeast-1b ap-southeast-1a apse1-az2

问题

  • 账号 A 的 ap-southeast-1a = 账号 B 的 ap-southeast-1b(物理位置相同)
  • 如果用 AZ 名称设计跨账号 VPC 对等连接或可用性架构,可能出现"看起来对称但物理不对称"的问题

Solution: Use AZ ID

使用 AZ IDapse1-az1)替代 AZ 名称:

availability_zone_ids:
  - apse1-az1  # 物理位置 apse1 的第一个 AZ
  - apse1-az2  # 物理位置 apse1 的第二个 AZ

优势

  • 跨账号一致性AZ ID 在所有账号中唯一标识同一物理位置
  • 可靠性设计:确保高可用架构在物理层面真正对称
  • VPC 对等连接:正确配置跨账号连接

How to Find AZ IDs

# 使用 AWS CLI 查询当前账号的 AZ ID 映射
aws ec2 describe-availability-zones --output json

输出示例:

{
    "AvailabilityZones": [
        {
            "ZoneName": "ap-southeast-1a",
            "ZoneId": "apse1-az1",
            "RegionName": "ap-southeast-1"
        },
        {
            "ZoneName": "ap-southeast-1b",
            "ZoneId": "apse1-az2",
            "RegionName": "ap-southeast-1"
        }
    ]
}

Key Concepts

  • VPC-自动化供给AZ ID 是 VPC YAML 配置的一部分
  • IPAMIPAM 与 VPC 供给集成时需考虑 AZ 映射

Connections

Aliases

  • AZ ID
  • Availability Zone Identifier
  • 物理可用区标识符