def build_ecs_training_command(s3_test_location, test_string):
    """
    Construct the command to send to the container for running scripts in ECS automation
    :param s3_test_location: S3 URI for test-related artifacts
    :param test_string: command to execute test script
    :return: <list> command to send to the container
    """
    return [
        f"mkdir -p /test/logs && aws s3 cp {s3_test_location}/ /test/ --recursive && chmod +x -R /test/ && {test_string}"
    ]