@reapit-cdk/userpool-domain
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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

Dependents (0)

Package Sidebar

Install

npm i @reapit-cdk/userpool-domain

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

122 kB

Total Files

10

Last publish

Collaborators

  • joshbalfour