我尝试创建 AWS CloudFormation 堆栈,但堆栈创建失败了。我收到以下错误消息:“Route did not stabilize in expected time”(路由没有在预期时间内稳定下来)。 如何解决此错误?
简短描述
您必须为分配到您的 Amazon Virtual Private Cloud (Amazon VPC) 中的 路由表的路由指定以下任一目标:
- 互联网网关或虚拟私有网关
- NAT 实例
- NAT 网关
- VPC 对等连接
- 网络接口
- 仅出口互联网网关
如果 AWS::EC2::Route 类型(您的目标)的任何属性值设置不正确,则您会收到“Route did not stabilize in expected time”错误。
例如,如果您错误将 NatGatewayId 属性的值设置为 GatewayId 属性,您将会收到此错误,如以下代码示例所示:
MyRoute ": {
"Type": "AWS::EC2::Route",
"Properties": {
"DestinationCidrBlock": "0.0.0.0/0",
"GatewayId": "nat-0a12bc456789de0fg",
"RouteTableId": {
"Ref": "MyRouteTable"
}
}
}
解决方案
为相应的属性指定正确的值。请参阅以下示例:
"GatewayId" : "igw-eaad4883"
-或者-
"NatGatewayId" : "nat-0a12bc456789de0fg"
有关堆栈创建失败的更多信息,请查看与该失败对应的 AWS CloudTrail 事件。