From cdde63612127d75ce92a55f28a91c549a5408ab8 Mon Sep 17 00:00:00 2001 From: Matthew Zhao Date: Sat, 6 Mar 2021 19:25:18 -0800 Subject: [PATCH] NAT GW too pricy --- deploy/aws/lib/deploy-stack.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/aws/lib/deploy-stack.ts b/deploy/aws/lib/deploy-stack.ts index 9c3e3c8..25fa7a4 100644 --- a/deploy/aws/lib/deploy-stack.ts +++ b/deploy/aws/lib/deploy-stack.ts @@ -13,7 +13,8 @@ export class DeployStack extends cdk.Stack { super(scope, id, props); // create vpc with 3 subnets const vpc = new ec2.Vpc(this, "LocalTunnelVPC", { - maxAzs: 3 + maxAzs: 3, + natGateways: 0 }) // create the ecs cluster const cluster = new ecs.Cluster(this, "LocalTunnelCluster", { @@ -54,7 +55,8 @@ export class DeployStack extends cdk.Stack { recordType: ecs_patterns.ApplicationLoadBalancedServiceRecordType.ALIAS, listenerPort: 443, domainName: domainName, - domainZone: DNSZone + domainZone: DNSZone, + assignPublicIp: true }) // set health route localtunnelsvc.targetGroup.configureHealthCheck({