Menu
Amazon Cognito
Developer Guide (Version Last Updated: 07/28/2016)

Assigning a Domain to Your User Pool

You can host the pages for your user pool on a subdomain of the Amazon Cognito domain by specifying your own prefix domain name.

The domain for your app will be https://<domain_prefix>.auth.<region>.amazoncognito.com.

The full URL for your app will look like this example: https://example.auth.us-east-1.amazoncognito.com/login?redirect_uri=https://www.google.com&response_type=code&client_id=<client_id_value>

Important

Before you can access the URL for your app, you must specify app client settings. For more information, see Specifying App Client Settings for Your User Pool.

Assigning a Domain to Your User Pool (AWS Management Console)

You can use the AWS Management Console to assign a domain to your user pool.

To assign a domain

  1. Sign in to the Amazon Cognito console.

  2. In the navigation pane, choose Manage your User Pools, and choose the user pool you want to edit.

  3. Choose the Domain name tab.

  4. On the Domain name tab, enter the domain name you want to use in the Prefix domain name box.

  5. Choose Check availability as needed.

  6. Choose Save changes.

Assigning a Domain to Your User Pool (AWS CLI and AWS API)

Use the following commands to create a custom domain name and assign it to your user pool.

To assign a domain

  • AWS CLI: aws cognito-idp create-user-pool-domain

    Example: aws cognito-idp create-user-pool-domain --user-pool-id <user_pool_id> --domain <domain_name>

  • AWS API: CreateUserPoolDomain

To get information about a domain

  • AWS CLI: aws cognito-idp describe-user-pool-domain

    Example: aws cognito-idp describe-user-pool-domain --domain <domain_name>

  • AWS API: DescribeUserPoolDomain

To delete a domain

  • AWS CLI: aws cognito-idp delete-user-pool-domain

    Example: aws cognito-idp delete-user-pool-domain --domain <domain_name>

  • AWS API: DeleteUserPoolDomain