@SuppressWarnings("unchecked")
List<String> instanceIds = (List<String>) execution.getVariable(ProcessVariables.INSTANCE_IDS);
checkNotNull(instanceIds, "%s not found as a process variable", ProcessVariables.INSTANCE_IDS);
LOG.info(">> Describing instances {}", instanceIds);
DescribeInstancesResult result = client.describeInstances(new DescribeInstancesRequest()
.withInstanceIds(instanceIds));
LOG.info("<< Got the following reservations: {}", result.getReservations());
List<Instance> instances = collectInstancesFromReservations(result.getReservations());
List<Machine> machines = Lists.transform(instances,
new Function<Instance, Machine>() {
@Override
public Machine apply(Instance instance) {
return Machine.builder()