amazon web services - How to use WaitHandler for a cluster in cloudformation? -


i have 2 ec2 instances master , slave, want start master ec2 instance , after in userdata complete, , should start my worker instance,

1.when try use below code both ec2 instance getting terminated after timeout period 900, please point out mistake.

2.how can use waithandler , create master first after has installed written inside userdata complete,i want stack start creating slave? please suggest me how can achieve this!

"sparkmasterec2instance" :{       "type" : "aws::ec2::instance",       "properties" : { ........... ........   } }, "mywaithandle" : {             "type" : "aws::cloudformation::waitconditionhandle",             "properties" : {             }         },     "mywaitcondition" : {             "type" : "aws::cloudformation::waitcondition",             "dependson" : "sparkmasterec2instance",             "properties" : {                 "handle" : { "ref" : "mywaithandle" },                 "timeout" : "900"         }      },     "sparkworkerec2instance" :{       "type" : "aws::ec2::instance",       "dependson" : "sparkmasterec2instance" 


Comments