From bbada9c819ae08f88f90dab731a2ced10bee96a0 Mon Sep 17 00:00:00 2001 From: Peter Mlocek Date: Fri, 22 Nov 2019 09:40:56 -0800 Subject: [PATCH 1/3] fix: Python ECS cluster example. --- python/ecs/cluster/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ecs/cluster/app.py b/python/ecs/cluster/app.py index 37bc2b7c2..4bbe2b631 100644 --- a/python/ecs/cluster/app.py +++ b/python/ecs/cluster/app.py @@ -24,7 +24,7 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: update_type=autoscaling.UpdateType.REPLACING_UPDATE, desired_capacity=3, vpc=vpc, - vpc_subnets={'subnetType': ec2.SubnetType.PUBLIC} + vpc_subnets=ec2.SubnetSelection(subnetType=ec2.SubnetType.PUBLIC) ) cluster = ecs.Cluster( From 7499facf37f4e40ebd226729b4c9cc30de88f952 Mon Sep 17 00:00:00 2001 From: Peter Mlocek Date: Fri, 22 Nov 2019 10:05:04 -0800 Subject: [PATCH 2/3] Actually fix that. --- python/ecs/cluster/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ecs/cluster/app.py b/python/ecs/cluster/app.py index 4bbe2b631..64b9f5dd1 100644 --- a/python/ecs/cluster/app.py +++ b/python/ecs/cluster/app.py @@ -24,7 +24,7 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: update_type=autoscaling.UpdateType.REPLACING_UPDATE, desired_capacity=3, vpc=vpc, - vpc_subnets=ec2.SubnetSelection(subnetType=ec2.SubnetType.PUBLIC) + vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PUBLIC) ) cluster = ecs.Cluster( From a6ffd56e674cdae1af7b1a8e14bac70360b5a633 Mon Sep 17 00:00:00 2001 From: Peter Mlocek Date: Fri, 22 Nov 2019 11:12:34 -0800 Subject: [PATCH 3/3] Fix context in url-shortener Python example. --- python/url-shortener/cdk.context.json | 63 +++++++++++++++------------ 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/python/url-shortener/cdk.context.json b/python/url-shortener/cdk.context.json index 823a10749..e196b7646 100644 --- a/python/url-shortener/cdk.context.json +++ b/python/url-shortener/cdk.context.json @@ -1,36 +1,43 @@ { - "vpc-provider:account=111111111111:filter.vpc-id=vpc-11111111111111111:region=us-east-1": { + "vpc-provider:account=111111111111:filter.vpc-id=vpc-11111111111111111:region=us-east-1:returnAsymmetricSubnets=true": { "vpcId": "vpc-11111111111111111", "availabilityZones": [ "us-east-1a", - "us-east-1b", - "us-east-1c" + "us-east-1b" ], - "privateSubnetIds": [ - "subnet-0096fdd5c93924860", - "subnet-0b4f435f11e937151", - "subnet-0136992e35ea88fe2" - ], - "privateSubnetNames": [ - "Private" - ], - "privateSubnetRouteTableIds": [ - "rtb-09d0493b9c095c1fa", - "rtb-0dec4782dc826b93b", - "rtb-035992729886f3420" - ], - "publicSubnetIds": [ - "subnet-0240a38329b9e2841", - "subnet-0328da1132e7d38c2", - "subnet-0ff88de2b066463c9" - ], - "publicSubnetNames": [ - "Public" - ], - "publicSubnetRouteTableIds": [ - "rtb-037fe65bfb5728835", - "rtb-07ccdcadf111c8e21", - "rtb-0232970151c7ef3fd" + "subnetGroups": [ + { + "name": "Public", + "type": "Public", + "subnets": [ + { + "availabilityZone": "us-east-1a", + "subnetId": "s-12345", + "routeTableId": "rtb-12345s" + }, + { + "availabilityZone": "us-east-1b", + "subnetId": "s-67890", + "routeTableId": "rtb-67890s" + } + ] + }, + { + "name": "Private", + "type": "Private", + "subnets": [ + { + "availabilityZone": "us-east-1a", + "subnetId": "p-12345", + "routeTableId": "rtb-12345p" + }, + { + "availabilityZone": "us-east-1b", + "subnetId": "p-67890", + "routeTableId": "rtb-57890p" + } + ] + } ] } }