aws / aws/aws-cdk

(aws-ecs): scaleOnRequestCount should take IApplicationTargetGroup

Open
#16,933 4 comments 3 reactions 0 assignees View on GitHub
@aws-cdk/aws-ecs effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
74

Description

### Description

`aws_ecs.ScalableTaskCount.scaleOnRequestCount` requires the targetGroup to be `ApplicationTargetGroup` which prevents it from working with load balancers referenced via `aws_elasticloadbalancingv2.ApplicationTargetGroup.fromTargetGroupAttributes`

https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ecs.RequestCountScalingProps.html

1.

### Use Case

I'd like to use request count autoscaling with a load balancer that was created outside the current cdk application. I'm referencing this load balancer via `ApplicationTargetGroup.fromTargetGroupAttributes`

### Proposed Solution

`IApplicationTargetGroup` could have the required properties added to it (firstLoadBalancerFullName and targetGroupFullName)

### Other information

_No response_

### Acknowledge

- [X] I may be able to implement this feature request
- [X] This feature might incur a breaking change

Contributor guide

Open the contributing guide

Research direction

Start with aws_ecs.ScalableTaskCount.scaleOnRequestCount and RequestCountScalingProps, then inspect ApplicationTargetGroup.fromTargetGroupAttributes and the IApplicationTargetGroup interface. Determine the required target-group properties and verify that imported application target groups can be used for request-count autoscaling without breaking existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.