Cannot add AutoScalingGroup to more than one Target Group
See original GitHub issueWhen attempting to assign an ASG to multiple target groups, CDK errors out with Cannot add AutoScalingGroup to 2nd Target Group
CFN supports passing in a list of Target Group ARNs to an autoscaling group - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-targetgrouparns
Use Case
This feature is necessary if anybody would like to assign multiple load balancers to an ASG
Proposed Solution
Remove the check here - https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts#L559
Figure out any other functions that are effected and come up with workarounds. Rico thinks there could be issues with scaleOnRequestCount()
Other
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 4 years ago
- Reactions:47
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Configuring auto scaling with multiple target groups
According to the AWS Documentation. If you attach multiple load balancer target groups or Classic Load Balancers to the group, all of them ......
Read more >Attach a load balancer to your Auto Scaling group
Amazon EC2 Auto Scaling adds instances to the attached target group when they are launched. You can attach one or multiple target groups,...
Read more >How to use the same target group of instances with 2 ELBs ...
I'm trying to route some traffic to one target group from two ELBs (ALBs). One is external & the other one is an...
Read more >aws-cdk.aws-elasticloadbalancingv2 - PyPI
The security groups of the load balancer and the target are automatically updated to allow the network traffic. One (or more) security groups...
Read more >Route Traffic to Multiple Target Groups using Load Balancer ...
In a prior video (https://youtu.be/ZGGpEwThhrM), we saw how to create a simple application load balancer that routed traffic to a single ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 We have a usecase where the application has to be exposed both internally and to Internet. Internet facing load balancer will be restricted to CloudFront IPs and internal load balancer will be accessed by another application for flushing. Hence we need to attach the same target group into internal load balancer and internet facing load balancer.
current workaround we are using