aws cdk typescript cloudfront certiifcate

0

Hello,

I am trying to pass existing certificate name (arn**) in below code.

  certificate: acm.Certificate.fromCertificateArn(this, 'ExistingCertificate', acmCertificateArn)

Hardcoding in a constant accepting where as pass through property not accepting. I am trying to save diff cert to diff env and pass the values dynamically which fails with undefined.

Could you suggest with code fix?

已提問 3 個月前檢視次數 178 次
1 個回答
0

Hello there,

Warm Greetings !

Thank you for reaching out to us with your concern.

I understand that you would like to know how you can pass the existing certificate ARN dynamically without hardcoding it.

I would like to highlight that assistance with application CDK code and code logic involves code support, I would like to take a moment to mention that assistance with code development or debugging is out of scope for AWS Premium Support. [+] AWS Support Scope - https://aws.amazon.com/premiumsupport/#Scope_of_AWS_Support

That being said, you may refer to some third party articles [1] which describes about using Certificate.fromCertificateArn class in CDK. Moreover, you may perform a lookup in your account by calling ListCertificates API to check the list of certificates if it is already existing in your account. Further, you may also refer to GitHub issues page [2] to seek guidance on dynamically passing the certificate ARNs.

Further, since code support is out of AWS Premium Support, and due to limited expertise with AWS CDK, we can assist you on best effort basis.

Hoping that the above helps.

References

[1] https://docs.aws.amazon.com/cdk/api/v1/docs/aws-certificatemanager-readme.html [2] https://github.com/aws/aws-cdk/issues/10792

AWS
支援工程師
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南