Fixed scripts to work well with stacks and autoscaling groups (it would only
produce a subset of hosts).