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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则