From 3fc080a9fe886fc9d0c8763d712017bfe71c980d Mon Sep 17 00:00:00 2001 From: Minh Doan Date: Sun, 8 Jul 2018 11:44:22 -0700 Subject: [PATCH] add more logic of create_instances --- aws-experiment-launch/create_instances.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aws-experiment-launch/create_instances.py b/aws-experiment-launch/create_instances.py index fa5a946b5..b2a44cf4d 100644 --- a/aws-experiment-launch/create_instances.py +++ b/aws-experiment-launch/create_instances.py @@ -114,8 +114,7 @@ if __name__ == "__main__": if node_name_tag: print("Managed to create instances for region %s" % region_number ) fout.write("%s %s\n" % (node_name_tag, region_number)) - filters = [{'Name': 'tag:Name','Values': [node_name_tag]}] - instance_ids = utils.get_instance_ids(ec2_client.describe_instances(Filters=filters)) + instance_ids = utils.get_instance_ids2(ec2_client, node_name_tag) for instance_id in instance_ids: fout2.write(instance_id + " " + node_name_tag + " " + region_number + " " + config[region_number][utils.REGION_NAME] + "\n") else: