aws cdk typescript cloudfront certiifcate



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?

asked 12 days ago84 views
1 Answer

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 -

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.


[1] [2]

answered 9 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions