CloudFormation Error: WaitCondition timed out. Received 0 conditions when expecting 1
amazon-web-services, aws-cloudformation
Solution
Ok, the problem is because you're using an auto-scaling launch config. Wait signals only really work when creating a real instance. Otherwise cloud formation creating the scaling group, and is waiting for an instance that is only created after your scaling group decides it needs to scale up one or more instances. Unfortunately, because the rest of the scaling group is waiting for a signal to be signalled (by a concrete instance), the scaling group never registers, therefore never creates the instance. Kind of a deadlock - or at the very list - an exceedingly long period of time forcing the timeout.
- Cloud Formation won't complete registration of the scaling group until the wait is signalled
- The wait will only signal after the registration of the scaling group AND an instance is created.
If you remove the launch config, and have it create a concrete instance - then your wait condition will signal.
Problem
I have spent many hours to figure out why my CloudFormation template failed using WaitCondition. The template error out: `WaitCondition timed out. Received 0 conditions when expecting 1` . Note that I did make sure that my AMI has cfn-signal command preinstall in my AMI. I have attached following screenshot of my template: I googled and found some people have the same issue like: http://virtuallyhyper.com/2013/02/cloudformation-waitcondition-timed-out-error/ . However, in my case, the cfn-signal command does exist. So until now I still don't know how to fix the issue. Thanks