aws-cdk-lib.aws_cognito.CognitoDomainOptions

interface CognitoDomainOptions

LanguageType name
.NETAmazon.CDK.AWS.Cognito.CognitoDomainOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscognito#CognitoDomainOptions
Javasoftware.amazon.awscdk.services.cognito.CognitoDomainOptions
Pythonaws_cdk.aws_cognito.CognitoDomainOptions
TypeScript (source)aws-cdk-lib » aws_cognito » CognitoDomainOptions

Options while specifying a cognito prefix domain.

See also: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-assign-domain-prefix.html

Example

const pool = new cognito.UserPool(this, 'Pool');

pool.addDomain('CognitoDomain', {
  cognitoDomain: {
    domainPrefix: 'my-awesome-app',
  },
});

const certificateArn = 'arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d';

const domainCert = certificatemanager.Certificate.fromCertificateArn(this, 'domainCert', certificateArn);
pool.addDomain('CustomDomain', {
  customDomain: {
    domainName: 'user.myapp.com',
    certificate: domainCert,
  },
});

Properties

NameTypeDescription
domainPrefixstringThe prefix to the Cognito hosted domain name that will be associated with the user pool.

domainPrefix

Type: string

The prefix to the Cognito hosted domain name that will be associated with the user pool.