question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ELBv2 CreateListener operation: You cannot set the isDefault parameter for a certificate.

See original GitHub issue

Seeing this with create_listener

An error occurred (ValidationError) when calling the CreateListener operation: You cannot set the isDefault parameter for a certificate.
            certificates = [{
                'CertificateArn': certificate_arn,
                'IsDefault': True
            }]
            keyword_args["Certificates"] = certificates
            default_actions=[{'Type': 'forward',
                              'TargetGroupArn': target_group_arn}],
            elbv2_client.create_listener(..., Protocol="HTTPS", Port=443, DefaultActions=default_actions, **keyword_args)

From looking at https://boto3.readthedocs.io/en/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_listener – it is unclear to me what IsDefault is since it is in a list of certificates itself, so when would it be specified without a certificate?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
jameslscommented, Jun 20, 2018

These kind of service API questions are best answered by the service team themselves on the AWS forums or on stackoverflow. They’re most familiar with their API and give you a definitive answer.

As a guess, it looks like the definition for the Certificates list is shared across several options, create_listener, add_listener_certificates, etc. And it looks like when using the list of certificates definition in the create_listener call you have to use it in a specific way as the docs state:

The default SSL server certificate. You must provide exactly one certificate. To create a certificate list, use AddListenerCertificates .

So I’d try just omitting the IsDefault flag for that operation.

1reaction
mukund-gandlurcommented, Jul 26, 2020

Running the command without isDefault=true replaced the default cert for me. There is no need to pass the isDefault argument

Read more comments on GitHub >

github_iconTop Results From Across the Web

CreateListener - Elastic Load Balancing - AWS Documentation
Set CertificateArn to the certificate ARN but do not set IsDefault . To create a certificate list for the listener, use AddListenerCertificates. Type:...
Read more >
add-listener-certificates — AWS CLI 2.9.6 Command Reference
The certificate to add. You can specify one certificate per call. Set CertificateArn to the certificate ARN but do not set IsDefault ....
Read more >
ElasticLoadBalancingv2 — Boto 3 Docs 1.9.86 documentation
Do not set IsDefault when specifying a certificate as an input parameter. Return type ... You cannot specify Elastic IP addresses for your...
Read more >
aws elbv2 create-listener | Fig
You cannot specify a protocol for a Gateway Load Balancer ... exactly one certificate. Set CertificateArn to the certificate ARN but do not...
Read more >
api.go - Google Git
You 've reached the limit on the number of certificates per load balancer. ... CreateListener API operation for Elastic Load Balancing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found