@@ -160,7 +160,7 @@ def ensure_ecs_security_group(region):
160
160
:param region: The region, or `None` to pull the region from the environment.
161
161
:return: The GroupId of the SecurityGroup.
162
162
"""
163
- sg_name = "axon-ecs- autogenerated"
163
+ sg_name = "axon-autogenerated-sg-ecs "
164
164
client = make_client ("ec2" , region )
165
165
sg_id = get_single_security_group (client , sg_name , "Axon autogenerated for ECS." )
166
166
ensure_ecs_gress (sg_id , region )
@@ -173,7 +173,7 @@ def ensure_ec2_security_group(region):
173
173
:param region: The region, or `None` to pull the region from the environment.
174
174
:return: The GroupId of the SecurityGroup.
175
175
"""
176
- sg_name = "axon-ec2- autogenerated"
176
+ sg_name = "axon-autogenerated-sg-ec2 "
177
177
client = make_client ("ec2" , region )
178
178
sg_id = get_single_security_group (client , sg_name , "Axon autogenerated for EC2." )
179
179
ensure_ec2_gress (sg_id , region )
@@ -221,7 +221,7 @@ def ensure_task_role(region):
221
221
:param region: The region, or `None` to pull the region from the environment.
222
222
:return: The role Arn.
223
223
"""
224
- role_name = "axon-ecs- autogenerated-task-role"
224
+ role_name = "axon-autogenerated-ecs -task-role"
225
225
client = make_client ("iam" , region )
226
226
role_arn = ensure_role (client , role_name )
227
227
if role_arn is None :
@@ -253,12 +253,10 @@ def ensure_task_role(region):
253
253
PolicyArn = "arn:aws:iam::aws:policy/AmazonEC2FullAccess" )
254
254
client .attach_role_policy (RoleName = role_name ,
255
255
PolicyArn = "arn:aws:iam::aws:policy/AmazonS3FullAccess" )
256
- client .attach_role_policy (RoleName = role_name ,
257
- PolicyArn = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess" )
258
256
return role_arn
259
257
260
258
261
- def ensure_ec2_role (region , role_name = "axon-ec2- autogenerated-role" ):
259
+ def ensure_ec2_role (region , role_name = "axon-autogenerated-ec2 -role" ):
262
260
"""
263
261
Ensures the EC2 role exists. Creates the role if it does not exist.
264
262
@@ -295,8 +293,8 @@ def ensure_ec2_role(region, role_name="axon-ec2-autogenerated-role"):
295
293
return role_arn
296
294
297
295
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" ):
300
298
"""
301
299
Ensures the EC2 instance profile exists and has the EC2 role attached.
302
300
@@ -656,7 +654,7 @@ def impl_upload_dataset(dataset_name, bucket_name, region):
656
654
:param region: The region, or `None` to pull the region from the environment.
657
655
"""
658
656
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 )
660
658
client .upload_file (dataset_name , bucket_name , remote_path )
661
659
print ("Uploaded to: {}\n " .format (remote_path ))
662
660
@@ -670,7 +668,7 @@ def impl_download_dataset(dataset_name, bucket_name, region):
670
668
:param region: The region, or `None` to pull the region from the environment.
671
669
"""
672
670
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 )
674
672
client .download_file (bucket_name , remote_path , dataset_name )
675
673
print ("Downloaded from: {}\n " .format (remote_path ))
676
674
0 commit comments