Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
badmintoncryer committed May 6, 2024
1 parent 35f1c0a commit 55d81d1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/aws-cdk-lib/aws-ecs-patterns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1088,3 +1088,29 @@ const queueProcessingFargateService = new ecsPatterns.NetworkLoadBalancedFargate
securityGroups: [securityGroup],
});
```

### Use dualstack NLB

```ts
// The VPC and subnet must have associated IPv6 CIDR blocks.
declare const vpc: ec2.Vpc;
declare const cluster: ecs.Cluster;

const networkLoadbalancedFargateService = new ecsPatterns.NetworkLoadBalancedFargateService(stack, 'NlbFargateService', {
cluster,
memoryLimitMiB: 1024,
taskImageOptions: {
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
},
ipAddressType: elbv2.IpAddressType.DUAL_STACK,
});

const networkLoadbalancedEc2Service = new ecsPatterns.NetworkLoadBalancedEc2Service(stack, 'NlbEc2Service', {
cluster,
memoryLimitMiB: 1024,
taskImageOptions: {
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
},
ipAddressType: elbv2.IpAddressType.DUAL_STACK,
});
```

0 comments on commit 55d81d1

Please sign in to comment.