checkState(isConfigured(), "attempt to use unconfigured ScalingGroup");
List<Machine> startedMachines = Lists.newArrayList();
try {
// get current group membership: {G}
AutoScalingGroup group = this.client
.getAutoScalingGroup(getScalingGroupName());
List<Instance> initialGroup = this.client
.getAutoScalingGroupMembers(getScalingGroupName());
LOG.debug("initial group: {}", initialGroup);
// increase desiredCapacity and wait for group to reach new size
int newDesiredSize = group.getDesiredCapacity() + count;
LOG.info("starting {} new instance(s) in scaling group '{}': "
+ "changing desired capacity from {} to {}", count,
getScalingGroupName(), group.getDesiredCapacity(),
newDesiredSize);
this.client.setDesiredSize(getScalingGroupName(), newDesiredSize);
// get new group membership: {N}
List<Instance> expandedGroup = this.client