Skip to content

Commit

Permalink
Change to loadBalancerTarget() (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhopaul123 authored and mergify[bot] committed Nov 1, 2019
1 parent df82bdd commit d858266
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion typescript/ecs/ecs-service-with-advanced-alb-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ const listener = lb.addListener('PublicListener', { port: 80, open: true });
// Attach ALB to ECS Service
listener.addTargets('ECS', {
port: 80,
targets: [service],
targets: [service.loadBalancerTarget({
containerName: 'web',
containerPort: 80
})],
// include health check (default is none)
healthCheck: {
interval: cdk.Duration.seconds(60),
Expand Down

0 comments on commit d858266

Please sign in to comment.