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.

[elasticloadbalancingv2] add `addAction()` to `IApplicationListener` and imported application listeners.

See original GitHub issue

I’d like for the IApplicationListener interface and imported listeners to include addAction() the same as ApplicationListener.

Use Case

I’d like to add a redirect listener rule to an imported ALB listener.

Proposed Solution

Why can’t we add this method to the IApplicationListener interface and then add the missing implementation to ImportedApplicationListener?

Other

I can work around this issue by manually creating ApplicationListenerRules and an ApplicationTargetGroup, but this approach is not as convenient as listener.addTarget('name', {...}).

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
gburke-ppbcommented, Jan 27, 2022

I too am looking for this.

We have an ALB that we use for multiple applications. For the most part using elbv2.ApplicationListener.fromApplicationListenerAttributes() to return an IApplicationListener and calling addTargetGroups() on this works – this is fine for just adding a host header and a forward to a TargetGroup. (although adding the priority is a bit of a headache… but that’s not for this issue).

However we are trying to add authentication with Cognito before forwarding to the TargetGroup, and this would be done using addAction() – this isn’t available on the returned object!

So using an existing ALB, how can we add this action?

Also the documentation for ApplicationListener itself mentions using addAction() over the other methods.

So can you please expose addAction() through the IApplicationListener interface? The only Class implementing this interface is ApplicationListener itself, so it should be an easy thing to add, I would hope.

We are currently blocked on a piece of work because of this. 😢

1reaction
gburke-ppbcommented, Jan 27, 2022

@njlynch I see you closed the new issue, but nobody is assigned to this one and nothing has been done since it was opened 16 months ago. Is this issue still to be fixed? Is there an ETA? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/aws-elasticloadbalancingv2 module
A new listener can be added to the Load Balancer by calling addListener() . ... from '@aws-cdk/aws-elasticloadbalancingv2-targets'; import * as ecs from ...
Read more >
awselasticloadbalancingv2 - Go Packages
A new listener can be added to the Load Balancer by calling addListener() . Listeners that have been added to the load balancer...
Read more >
IApplicationListener.Jsii$Proxy (software.amazon.awscdk:aws-cdk ...
Perform the given action on incoming requests. void, addCertificates(String id, List<IListenerCertificate> certificates). Add one or more certificates to this ...
Read more >
GuHttpsApplicationListener | @guardian/cdk - v48.5.2
You must pass a [[ GuCertificate ]] to this Listener via the certificate prop. For general details about Listeners, see [[ GuApplicationListener ]]....
Read more >
ElasticLoadBalancingv2 — Boto3 Docs 1.26.36 documentation
For more information, see HTTPS listeners in the Application Load Balancers Guide ... This example adds the specified tags to the specified load...
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