reapit-cdk.userpool-domain 0.1.2

Creator: bradpython12

Last updated:

0 purchases

reapit-cdk.userpool-domain 0.1.2 Image
reapit-cdk.userpool-domain 0.1.2 Images

Languages

Categories

Add to Cart

Description:

reapitcdk.userpooldomain 0.1.2

@reapit-cdk/userpool-domain




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,
})

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.