aws / aws/aws-cdk

[aws-elasticloadbalancingv2] Ability to set session stickiness attribute for target group

Open
#10,198 1 comment 9 reactions 0 assignees View on GitHub
@aws-cdk/aws-elasticloadbalancingv2 effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
74

Description

It's possible to set deregistration delay attribute for target group but not the session stickiness attribute https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html
https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#sticky-sessions

### Proposed Solution

Something like this would be convenient but may be confusing what type of stickiness is this - between targets in a group or between groups.

```
const fleet = listener.addTargets("Targets", {
port: 443,
targets: [asg],
deregistrationDelay: core.Duration.seconds(15),
// enable sticky session to route traffic to the same target in a target group
stickiness: true,
});
```

---

This is a :rocket: Feature Request

Contributor guide

Open the contributing guide

Research direction

Start from the AWS CDK target-group API used by listener.addTargets and compare its existing deregistrationDelay support with the AWS CloudFormation target-group attributes and ELBv2 sticky-sessions documentation linked in the issue. Clarify which session-stickiness modes and API shape are intended, then verify that the target group can configure stickiness and that the resulting synthesized configuration matches AWS expectations.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.