autoscaling - AWS Autoscale Load Balancing with Cloudformation -


i'm trying create ec2 instance, use autoscaling, attached load balancer.

unfortunately, i'm getting error

the availability zones of specified subnets , autoscalinggroup not match 

however, current cloudformation script:

"apiautoscaling" : {   "type" : "aws::autoscaling::autoscalinggroup",   "properties" : {     "vpczoneidentifier" : [ "subnet-5ff05206", "subnet-b1109fc6", "subnet-948ce5f1" ],     "instanceid" : {       "ref" : "apiec2"     },     "maxsize" : 3,     "minsize" : 1,     "loadbalancernames" : [ "api" ]   } }, "apiloadbalancer" : {   "type" : "aws::elasticloadbalancing::loadbalancer",   "properties" : {     "loadbalancername" : "api",     "listeners" : [       {         "instanceport" : "80",         "instanceprotocol" : "http",         "loadbalancerport" : "80",         "protocol" : "http"       },       {         "instanceport" : "80",         "instanceprotocol" : "http",         "loadbalancerport" : "443",         "protocol" : "https",         "sslcertificateid" : "arn:aws:iam::xxx"       }     ],     "securitygroups" : [ "sg-a88444cc" ],     "subnets" : [ "subnet-5ff05206", "subnet-b1109fc6", "subnet-948ce5f1" ]   } } 

as can see, subnet list same both autoscaling group , load balancer. i've misunderstood how supposed work, can't work out.

try specifying availabilityzones property auto scaling group. default use of them, if subnets use subnet of zones, error message.

(as pointed out in comments, "availabilityzones" : { "fn::getazs" : "" } should trick.)


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -