diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 650c4ad352a..6e53d5af279 100644 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -33,7 +33,7 @@ function get_instance_ids { } function get_vpc_id { - python -c 'import json,sys; lst = [str(vpc["VpcId"]) for vpc in json.load(sys.stdin)["Vpcs"] for tag in vpc["Tags"] if tag["Value"] == "kubernetes-vpc"]; print "".join(lst)' + python -c 'import json,sys; lst = [str(vpc["VpcId"]) for vpc in json.load(sys.stdin)["Vpcs"] for tag in vpc.get("Tags", []) if tag["Value"] == "kubernetes-vpc"]; print "".join(lst)' } function get_subnet_id {