Skip to content

(aws-elasticloadbalancerv2): Unable to add more than one certificate to NLB via CDK #16509

@abhiramiyer

Description

@abhiramiyer

❓ General Issue

The Question

I am unable to synthesize a NetworkListener with multiple ACM certificates. Synthesis with one certificate works as expected. As per the documentation this is supported, but during synthesis I get this error:
"
Resource handler returned message: "Up to '1' certificate ARNs can be specified, but '2' were specified (Service: ElasticLoadBalancingV2, Status Code: 400, Request ID: <removed>, Extended Request ID: null)" (RequestToken: <removed>, HandlerErrorCode: ServiceLimitExceeded)
"

Environment

  • CDK CLI Version:
    1.120.0
  • Module Version:
    1.120.0
  • Node.js Version:
    14.17.0
  • OS:
    all
  • Language (Version):
    Typescript

Other information

Code snippet :

// let certificates = array of ACM certificates

const listenerCertificates = certificates.map((c) => {
    return ListenerCertificate.fromArn(c.certificateArn);
 });

loadBalancer.addListener("TlsListener", {
    port: 443,
    protocol: Protocol.TLS,
    certificates: listenerCertificates,        

});

Metadata

Metadata

Labels

guidanceQuestion that needs advice or information.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions