-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
-
I'm submitting a ...
- πͺ² bug report
- π feature request
- π construct library gap
- βοΈ security issue or vulnerability => Please see policy
- β support request => Please see note at the top of this template.
-
What is the current behavior?
I use typescript CDK to create an API gateway LambdaRestApi with a certificate in the domainName. I get the certificate usingcertmanager.Certificate.fromCertificateArnpassing the entire arn, likearn:aws:acm:REGION:ACC_ID:certificate/CERT_ID, but when deploying the stack, I get error:The provided certificate does not exist -
What is the expected behavior (or behavior of feature suggested)?
To get the certificate using the ARN and inject that to the APIGW provider. -
Please tell us about your environment:
- CDK CLI Version: 1.3.0 (build bba9914)
- Module Version: @aws-cdk/aws-certificatemanager 1.3.0
- OS: [ OSX Mojave 10.14.6 ]
- Language: [ TypeScript ]
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
Here's a code sample:
var certArn = 'arn:aws:acm:REGION:ACCOUNT:certificate/ID'
const cert = certmanager.Certificate.fromCertificateArn(this, 'SomeCertName', certArn);
// Set up the API and its resources
const apiGW = new apigw.LambdaRestApi(this, 'RestAPIName',
{
handler: getTenantsLambdaFn,
domainName: {
domainName: 'SOMEDOMAINNAME',
certificate: cert,
},
deployOptions: {
loggingLevel: apigw.MethodLoggingLevel.INFO,
dataTraceEnabled: true
},
proxy: false
});