From 12f1eaace7434551505f405c7e5cdf040e3f64e0 Mon Sep 17 00:00:00 2001 From: Sergio Garcia <38561120+sergargar@users.noreply.github.com> Date: Thu, 12 Jan 2023 17:35:57 +0100 Subject: [PATCH] fix: VPC Key Error (#1695) Co-authored-by: sergargar --- prowler/providers/aws/services/vpc/vpc_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prowler/providers/aws/services/vpc/vpc_service.py b/prowler/providers/aws/services/vpc/vpc_service.py index cc5676b8..c2d00fe0 100644 --- a/prowler/providers/aws/services/vpc/vpc_service.py +++ b/prowler/providers/aws/services/vpc/vpc_service.py @@ -99,7 +99,8 @@ class VPC: if ( route["Origin"] != "CreateRouteTable" ): # avoid default route table - destination_cidrs.append(route["DestinationCidrBlock"]) + if "DestinationCidrBlock" in route: + destination_cidrs.append(route["DestinationCidrBlock"]) conn.route_tables.append( Route( route_table["RouteTableId"],