I have a cloudformation script that attempts to create a VPC, with one subnet per AZ.
When I run:
aws ec2 describe-availablity-zones
I get 4 zones returned:
"AvailabilityZones": [
{
"State": "available",
"RegionName": "us-east-1",
"Messages": [],
"ZoneName": "us-east-1a"
},
{
"State": "available",
"RegionName": "us-east-1",
"Messages": [],
"ZoneName": "us-east-1b"
},
{
"State": "available",
"RegionName": "us-east-1",
"Messages": [],
"ZoneName": "us-east-1c"
},
{
"State": "available",
"RegionName": "us-east-1",
"Messages": [],
"ZoneName": "us-east-1d"
}
]
However, when I try to create my stack, I get an error:
"ResourceStatusReason": "Value (us-east-1a) for parameter availabilityZone
is invalid. Subnets can currently only be created in the following
availability zones: us-east-1c, us-east-1b, us-east-1d.",
I am specifying the AZ with
"AvailabilityZone" : {
"Fn::Select" : [ "0", { "Fn::GetAZs" : "" } ]
},
Is there a way to check to see if the AZ is really available for the creation of a subnet?