AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Cognito::UserPoolDomain

CfnUserPoolDomain

The AWS::Cognito::UserPoolDomain resource creates a new domain for a user pool.

Import

import { CfnUserPoolDomain } from 'aws-cdk-lib/aws-cognito';

Or use the module namespace:

import * as cognito from 'aws-cdk-lib/aws-cognito';
// cognito.CfnUserPoolDomain

Properties

Configuration passed to the constructor as CfnUserPoolDomainProps.

domainRequired
string

The name of the domain that you want to update. For custom domains, this is the fully-qualified domain name, for example `auth.example.com` . For prefix domains, this is the prefix alone, such as `myprefix` .

userPoolIdRequired
string

The ID of the user pool that is associated with the domain you're updating.

customDomainConfigOptional
IResolvable | CustomDomainConfigTypeProperty

The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM. When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.

managedLoginVersionOptional
number

A version number that indicates the state of managed login for your domain. Version `1` is hosted UI (classic). Version `2` is the newer managed login with the branding editor. For more information, see [Managed login](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html) .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon Cognito Cheat Sheet

Everything you need to know about Amazon Cognito on one page. HD quality, print-friendly.

Download Free Infographic