My Scenario
In a CloudFormation template I have a single VPC, a public subnet and a private subnet. In the public subnet I have amazons NAT AMI in an instance. In the private subnet I have an autoscaling group behind an internal LoadBalancer. This autoScaling group has a LaunchConfig to install httpd with a demo web page.
The problem
The EC2 instance launched in this private subnet autoscaling group does not install the webserver. This causes my ELB to fail and rollback the whole cloudformation stack. However, I can SSH in after creation, where I can successfully wget internet web pages and use yum install httpd manually. This fixes my cloudFormation stack by making the ELB check happy. /var/log/cloudinit-output.log says the instance couldn't resolve the amazon yum repository during its initialization.
I have a feeling this may be caused by the LaunchConfig being kicked off in a new EC2 instance before the NAT instance is fully up and working. I have tried adding 'DependsOn' : 'NATInstance' to the AutoScaling group but this has not fixed the issue.
Can you help?