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.

aws-elasticloadbalancingv2: cannot create lambda TargetGroup

See original GitHub issue

What is the problem?

Cannot create lambda TargetGroup as the created cfn template has stickiness.enabled set as true in TargetGroupAttributes. Seems like this attribute is not expected for lambda based target groups.

Reproduction Steps

const lambdaTargetGroup = new ApplicationTargetGroup(this, TargetGroup, { targets: [new targets.LambdaTarget(lambdaFunction)], });

You should be able to see stickiness.enabled set in cfn template. During deployment , deployment fails with

The provided target group attribute is not supported (Service: AmazonElasticLoadBalancing; Status Code: 400

What did you expect to happen?

Target group with lambda targets getting created successfully

What actually happened?

Target group with lambda targets are not getting created

CDK CLI Version

1.130

Framework Version

No response

Node.js Version

17.0.1

OS

macos 11.3.1

Language

Typescript

Language Version

No response

Other information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:11
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
gburke-ppbcommented, Nov 11, 2021

Any idea when this issue will be fixed? There have been 2 releases of the CDK since it was introduced and it’s still present…

5reactions
koshiccommented, Nov 23, 2021

Much simple workaround - ‘listener.addTargets(…).setAttribute(‘stickiness.enabled’, undefined)’

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS::ElasticLoadBalancingV2::TargetGroup
You can't specify targets for a target group using more than one target type. ... The following example creates a target group where...
Read more >
aws.elasticloadbalancingv2.TargetGroup - Pulumi
Identifier of the VPC in which to create the target group. Required when target_type is instance , ip or alb . Does not...
Read more >
@aws-cdk/aws-elasticloadbalancingv2 - npm
Routing traffic from a Load Balancer to a Target involves the following steps: Create a Target Group, register the Target into the Target...
Read more >
awselasticloadbalancingv2targets - Go Packages
Create a new Lambda target. ... AttachToNetworkTargetGroup(targetGroup awselasticloadbalancingv2. ... You can't specify publicly routable IP addresses.
Read more >
AWS CLI ALB create target group error with lambda as a target
I'm stuck, i've tried json file input with the same result. once you create the target group you can't change target-type (i tried...
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