Describe the feature
Currently we use an AwsCutstomResource to get cloudFrontDomainName attribute for a UserPoolDomain resource.
|
public get cloudFrontDomainName(): string { |
|
if (!this.cloudFrontCustomResource) { |
|
const sdkCall: AwsSdkCall = { |
|
service: 'CognitoIdentityServiceProvider', |
|
action: 'describeUserPoolDomain', |
|
parameters: { |
|
Domain: this.domainName, |
|
}, |
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.
public get cloudFrontDomainName(): string {
return resource.getAtt('CloudFrontDistribution').toString(),
}
Other Information
No response
Acknowledgements
CDK version used
2.155.0
Environment details (OS name and version, etc.)
macOS
Describe the feature
Currently we use an AwsCutstomResource to get
cloudFrontDomainNameattribute 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
getAttcall.Other Information
No response
Acknowledgements
CDK version used
2.155.0
Environment details (OS name and version, etc.)
macOS