AWS 实验室 VPC 无法创建

AWS lab VPC failing to create

我正在阅读 AWS 架构完善的实验室指南,并正在研究 VPC 的自动部署 (https://www.wellarchitectedlabs.com/Security/200_Automated_Deployment_of_VPC/Lab_Guide.html)。

说明非常简单,我上传了提供的模板(尝试了说明中直接链接的模板和我在此处 https://github.com/awslabs/aws-well-architected-labs/blob/master/Security/200_Automated_Deployment_of_VPC/Code/vpc-alb-app-db.yaml 找到的 git 存储库中的模板)。但是当它运行时,我不断收到失败消息。这些错误表明无法在 us-west-1c 中启动事物:

这是 VPC 的:

我使用具有管理员访问权限的 IAM 用户登录并尝试清理 YAML,因为我发现了一些重复的字段,但没有任何效果。是我的账户在us-west-1c无法创建任何东西,因为它超载了还是什么的,还是其他什么问题?

答案如图所示:CloudFormation 无法创建 ALB1Subnet3,因为可用区 us-west-1c 不存在。当新堆栈中的任何一个失败时,整个堆栈都会回滚。

here所述,您可以使用 CLI 获取区域的可用性区域列表:

aws ec2 describe-availability-zones --region us-west-1

您会看到该区域只有两个可用区:

{
    "AvailabilityZones": [
        {
            "State": "available",
            "OptInStatus": "opt-in-not-required",
            "Messages": [],
            "RegionName": "us-west-1",
            "ZoneName": "us-west-1b",
            "ZoneId": "usw1-az3",
            "GroupName": "us-west-1",
            "NetworkBorderGroup": "us-west-1"
        },
        {
            "State": "available",
            "OptInStatus": "opt-in-not-required",
            "Messages": [],
            "RegionName": "us-west-1",
            "ZoneName": "us-west-1c",
            "ZoneId": "usw1-az1",
            "GroupName": "us-west-1",
            "NetworkBorderGroup": "us-west-1"
        }
    ]
}

更新

有人指出 us-west-1c 出现在我的可用区列表中。发生这种情况是因为 my 可用性区域与 OP 的可用性区域不同。引用 docs:

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.

因此对于 OP,错误消息是正确的:没有 us-west-1c。我的解释——us-west-1 只有两个区域——也是正确的。

但是,如果您查看 AWS 全球基础设施地图(页面 here 的一半左右),然后将鼠标悬停在 us-west-1区域,你会看到它有3个可用区。但是,任何给定帐户可能无法访问一个区域中的所有可用区。