from typing import Any


def create_user_pool_url(event: Any, context: Any) -> str:
    """
    Create userpool url from params.
    :param event: lambda event
    :param context: context
    :return: str
    """
    if not event["full_custom_domain_name"] or not (
            event["user_pool_domain_prefix"] and event["region"]
    ):
        raise Exception(
            "Please provide either full_custom_domain_name or user_pool_domain_prefix and region"
        )

    return (
        event["full_custom_domain_name"]
        if event["full_custom_domain_name"]
        else "https://{}.auth.{}.amazoncognito.com".format(
            event["user_pool_domain_prefix"], event["region"]
        )
    )