cognito: Remove custom resource from UserPoolDomain to get CloudFrontDistribution
attribute
#31342
Labels
@aws-cdk/aws-cognito
Related to Amazon Cognito
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
Currently we use an AwsCutstomResource to get
cloudFrontDomainName
attribute for a UserPoolDomain resource.aws-cdk/packages/aws-cdk-lib/aws-cognito/lib/user-pool-domain.ts
Lines 129 to 136 in 4b9643f
But actually CFn exposes the attribute natively. We can remove the unnecessary custom resource usage.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpooldomain.html#aws-resource-cognito-userpooldomain-return-values
Use Case
To get a CloudFront domain for a user pool domain without using a custom resource. c.f. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html
Proposed Solution
We can just replace it with a
getAtt
call.Other Information
No response
Acknowledgements
CDK version used
2.155.0
Environment details (OS name and version, etc.)
macOS
The text was updated successfully, but these errors were encountered: