aws-cdk
aws-cdk copied to clipboard
Error when adding ApplicationLoadBalancer in front of QueueProcessingFargateService
-
I'm submitting a ...
- [x] :beetle: bug report
-
What is the current behavior?
Code:
const service = new ECSPatterns.QueueProcessingFargateService(this, 'QueueService', {
cluster,
memoryLimitMiB: 512,
image: ECS.EcrImage.fromEcrRepository(repository),
memoryLimitMiB: 512,
cpu: 256,
desiredTaskCount: 1,
queue,
});
const lb = new ELBv2.ApplicationLoadBalancer(this, 'LB', { vpc, internetFacing: true });
const listener = lb.addListener('Listener', { port: 80 });
const target = listener.addTargets('ECS', {
protocol: ELBv2.Protocol.HTTP,
port: 9222,
targets: [service]
});
Result:
aws-elasticloadbalancingv2/lib/alb/application-target-group.ts:104
const result = target.attachToApplicationTargetGroup(this);
^
TypeError: target.attachToApplicationTargetGroup is not a function
What is the resolution here? Got into similar problem. Dunno how to fix that :(
@stephankaag were you able to resolve this? having same issue...
I'm having the same issue. Any idea on how to fix it?