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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file reapit-cdk.userpool-domain-0.1.2.tar.gz.

File metadata

File hashes

Hashes for reapit-cdk.userpool-domain-0.1.2.tar.gz
Algorithm Hash digest
SHA256 410972ef56d51ad5d77a406502aff51f1a2658d1e09e2fa6fc4bc02d2eff0a0f
MD5 9670e7a07ccf87400317aac1e7b16d84
BLAKE2b-256 812face41c9979799d94f14a4dd6c9f5d94867e8339b965b8aca395dd3ac0f29

See more details on using hashes here.

File details

Details for the file reapit_cdk.userpool_domain-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for reapit_cdk.userpool_domain-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5ea51984ec24bc2529bcbd58a441f2cfe7d5912d82b90bbf5fc1cd934aaaf7ea
MD5 eb3036bbd55057cd6b762100f834fd7d
BLAKE2b-256 2f51f828cb308fbd0b37ca3f6e4b74f1feae87a1e3c3d9aecdcab355739830f7

See more details on using hashes here.

Supported by

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