@@ -160,7 +160,7 @@ def ensure_ecs_security_group(region):
160160 :param region: The region, or `None` to pull the region from the environment.
161161 :return: The GroupId of the SecurityGroup.
162162 """
163- sg_name = "axon-ecs- autogenerated"
163+ sg_name = "axon-autogenerated-sg-ecs "
164164 client = make_client ("ec2" , region )
165165 sg_id = get_single_security_group (client , sg_name , "Axon autogenerated for ECS." )
166166 ensure_ecs_gress (sg_id , region )
@@ -173,7 +173,7 @@ def ensure_ec2_security_group(region):
173173 :param region: The region, or `None` to pull the region from the environment.
174174 :return: The GroupId of the SecurityGroup.
175175 """
176- sg_name = "axon-ec2- autogenerated"
176+ sg_name = "axon-autogenerated-sg-ec2 "
177177 client = make_client ("ec2" , region )
178178 sg_id = get_single_security_group (client , sg_name , "Axon autogenerated for EC2." )
179179 ensure_ec2_gress (sg_id , region )
@@ -221,7 +221,7 @@ def ensure_task_role(region):
221221 :param region: The region, or `None` to pull the region from the environment.
222222 :return: The role Arn.
223223 """
224- role_name = "axon-ecs- autogenerated-task-role"
224+ role_name = "axon-autogenerated-ecs -task-role"
225225 client = make_client ("iam" , region )
226226 role_arn = ensure_role (client , role_name )
227227 if role_arn is None :
@@ -253,12 +253,10 @@ def ensure_task_role(region):
253253 PolicyArn = "arn:aws:iam::aws:policy/AmazonEC2FullAccess" )
254254 client .attach_role_policy (RoleName = role_name ,
255255 PolicyArn = "arn:aws:iam::aws:policy/AmazonS3FullAccess" )
256- client .attach_role_policy (RoleName = role_name ,
257- PolicyArn = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess" )
258256 return role_arn
259257
260258
261- def ensure_ec2_role (region , role_name = "axon-ec2- autogenerated-role" ):
259+ def ensure_ec2_role (region , role_name = "axon-autogenerated-ec2 -role" ):
262260 """
263261 Ensures the EC2 role exists. Creates the role if it does not exist.
264262
@@ -295,8 +293,8 @@ def ensure_ec2_role(region, role_name="axon-ec2-autogenerated-role"):
295293 return role_arn
296294
297295
298- def ensure_ec2_instance_profile (region , profile_name = "axon-ec2- autogenerated-instance-profile" ,
299- role_name = "axon-ec2- autogenerated-role" ):
296+ def ensure_ec2_instance_profile (region , profile_name = "axon-autogenerated-ec2 -instance-profile" ,
297+ role_name = "axon-autogenerated-ec2 -role" ):
300298 """
301299 Ensures the EC2 instance profile exists and has the EC2 role attached.
302300
@@ -656,7 +654,7 @@ def impl_upload_dataset(dataset_name, bucket_name, region):
656654 :param region: The region, or `None` to pull the region from the environment.
657655 """
658656 client = make_client ("s3" , region )
659- remote_path = "axon-uploaded- datasets/" + os .path .basename (dataset_name )
657+ remote_path = "axon-datasets/" + os .path .basename (dataset_name )
660658 client .upload_file (dataset_name , bucket_name , remote_path )
661659 print ("Uploaded to: {}\n " .format (remote_path ))
662660
@@ -670,7 +668,7 @@ def impl_download_dataset(dataset_name, bucket_name, region):
670668 :param region: The region, or `None` to pull the region from the environment.
671669 """
672670 client = make_client ("s3" , region )
673- remote_path = "axon-uploaded- datasets/" + os .path .basename (dataset_name )
671+ remote_path = "axon-datasets/" + os .path .basename (dataset_name )
674672 client .download_file (bucket_name , remote_path , dataset_name )
675673 print ("Downloaded from: {}\n " .format (remote_path ))
676674
0 commit comments