diff --git a/aws-experiment-launch/create_instances.py b/aws-experiment-launch/create_instances.py index de34b9faf..b5d2f7f71 100644 --- a/aws-experiment-launch/create_instances.py +++ b/aws-experiment-launch/create_instances.py @@ -77,6 +77,11 @@ def create_instances(config, ec2_client, region_number, number_of_instances): ], ) + instance_ids = utils.get_instance_ids2(ec2_client, node_name_tag) + LOGGER.info("Waiting for all %d instances in region %s to be in RUNNING" % (len(instance_ids), region_number)) + waiter = ec2_client.get_waiter('instance_running') + waiter.wait(InstanceIds=instance_ids) + count = 0 while count < 40: time.sleep(5)