def get_partition()

in source/ecs/workspaces_app.py [0:0]


def get_partition():
    """
    This method gets the partition based on the region of deployment.
    """
    log.debug("Getting the value for the partition")
    my_session = boto3.session.Session()
    my_region = my_session.region_name
    log.debug("The region is {}".format(my_region))
    if 'gov' in my_region:
        partition = 'aws-us-gov'
    elif 'cn' in my_region:
        partition = 'aws-cn'
    else:
        partition = 'aws'
    log.debug("Returning the partition value as {}".format(partition))
    return partition