This template creates a custom domain, "my-test-user-pool-domain" for the Cognito user pool referenced by the UserPool parameter. The template also requires a certificate referenced by CertificateArn

CloudFormation Template