Skip to main content

This construct returns the given Cognito UserPool's UserPoolDomain, or creates one. This resolves an issue with [AWS::Cognito::UserPoolDomain](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpooldomain.html), since that will fail if one already exists.

Project description

@reapit-cdk/userpool-domain

npm version npm downloads coverage: 99.02%25 Integ Tests: ✔

This construct returns the given Cognito UserPool's UserPoolDomain, or creates one. This resolves an issue with AWS::Cognito::UserPoolDomain, since that will fail if one already exists.

Package Installation:

yarn add --dev @reapit-cdk/userpool-domain
# or
npm install @reapit-cdk/userpool-domain --save-dev

Usage

import { CfnOutput, Stack, App } from 'aws-cdk-lib'
import { UserPool } from 'aws-cdk-lib/aws-cognito'
import { UserPoolDomain } from '@reapit-cdk/userpool-domain'

const app = new App()
const stack = new Stack(app, 'stack-name')
const userPool = UserPool.fromUserPoolId(stack, 'userpool', 'USERPOOL_ID')
const userPoolDomain = new UserPoolDomain(stack, 'domain', { userPool })
new CfnOutput(stack, 'userPoolDomain', {
  value: userPoolDomain.domain,
})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reapit-cdk.userpool-domain-0.1.2.tar.gz (111.7 kB view hashes)

Uploaded Source

Built Distribution

reapit_cdk.userpool_domain-0.1.2-py3-none-any.whl (110.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page