def update_user_profile()

in UserProfile_function.py [0:0]


def update_user_profile(domain_id, user_profile_name, user_settings):
    response = client.update_user_profile(
        DomainId=domain_id,
        UserProfileName=user_profile_name,
        UserSettings=user_settings
    )
    updated = False
    while not updated:
        response = client.describe_user_profile(DomainId=domain_id,UserProfileName=user_profile_name)
        if response['Status'] == 'InService':
            updated = True
        else:
            logging.info('Updating .. %s', response['Status'])
        time.sleep(5)
    return response