File tree Expand file tree Collapse file tree
packages/aws-cdk-lib/aws-ecs-patterns Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1088,3 +1088,29 @@ const queueProcessingFargateService = new ecsPatterns.NetworkLoadBalancedFargate
10881088 securityGroups: [securityGroup ],
10891089});
10901090```
1091+
1092+ ### Use dualstack NLB
1093+
1094+ ``` ts
1095+ // The VPC and subnet must have associated IPv6 CIDR blocks.
1096+ declare const vpc: ec2 .Vpc ;
1097+ declare const cluster: ecs .Cluster ;
1098+
1099+ const networkLoadbalancedFargateService = new ecsPatterns .NetworkLoadBalancedFargateService (stack , ' NlbFargateService' , {
1100+ cluster ,
1101+ memoryLimitMiB: 1024 ,
1102+ taskImageOptions: {
1103+ image: ecs .ContainerImage .fromRegistry (' amazon/amazon-ecs-sample' ),
1104+ },
1105+ ipAddressType: elbv2 .IpAddressType .DUAL_STACK ,
1106+ });
1107+
1108+ const networkLoadbalancedEc2Service = new ecsPatterns .NetworkLoadBalancedEc2Service (stack , ' NlbEc2Service' , {
1109+ cluster ,
1110+ memoryLimitMiB: 1024 ,
1111+ taskImageOptions: {
1112+ image: ecs .ContainerImage .fromRegistry (' amazon/amazon-ecs-sample' ),
1113+ },
1114+ ipAddressType: elbv2 .IpAddressType .DUAL_STACK ,
1115+ });
1116+ ```
You can’t perform that action at this time.
0 commit comments