def METHOD_NAME(request, ecs_cluster_name, training_script):
    artifact_folder = f"{ecs_cluster_name}-folder"
    s3_test_artifact_location = test_utils.upload_tests_to_s3(artifact_folder)
    def delete_s3_artifact_copy():
        test_utils.delete_uploaded_tests_from_s3(s3_test_artifact_location)
    request.addfinalizer(delete_s3_artifact_copy)
    return ecs_utils.build_ecs_training_command(s3_test_artifact_location, training_script)