I am unable to create a Cloudformation template to autoscale across 2 different public subnets. I keep getting the error
CREATE_FAILED
AWS::AutoScaling::AutoScalingGroup
The availability zones of the specified subnets and the Auto Scaling group do not match
I have extensively researched all the different template code possibilities and I've tried them all, including
Defining the exact AZs like this:
AvailabilityZones" : [ us-west-2a, us-west-2b ],
Using the VPCZone Identifier property instead and leaving the AvailabilityZone property out of the resource:
"VPCZoneIdentifier" : [ subnet-1234, subnet-5678 ]
but here is my latest attempt:
"ASASGS3JJ": {
"Type": "AWS::AutoScaling::AutoScalingGroup",
"Properties": {
"AvailabilityZones": {
"Fn::GetAZs": ""
},
"InstanceId": {
"Ref": "EC2I12Q2R"
},
"LoadBalancerNames": [
"ELBLB2IQL9"
],
"MaxSize": 2,
"MinSize": 2
},
Unfortunately still getting the same error. Can I please get some assistance on how to properly format? Do I need to change any code outside of the Autoscaling group resource?