From cd17fc9b816f5932ac05bdd70c7b45bc951e8b51 Mon Sep 17 00:00:00 2001 From: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com> Date: Mon, 15 May 2023 10:53:20 -0400 Subject: [PATCH] Fixes #1161 optional Instance.PrivateDnsName (#1162) Fixes #1161 Because the PrivateDnsName property is optional sometimes. --- cartography/intel/aws/ec2/instances.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cartography/intel/aws/ec2/instances.py b/cartography/intel/aws/ec2/instances.py index 11bac4a387..e27059c5f8 100644 --- a/cartography/intel/aws/ec2/instances.py +++ b/cartography/intel/aws/ec2/instances.py @@ -127,7 +127,7 @@ def transform_ec2_instances(reservations: List[Dict[str, Any]], region: str, cur 'Status': network_interface['Status'], 'MacAddress': network_interface['MacAddress'], 'Description': network_interface['Description'], - 'PrivateDnsName': network_interface['PrivateDnsName'], + 'PrivateDnsName': network_interface.get('PrivateDnsName'), 'PrivateIpAddress': network_interface['PrivateIpAddress'], 'InstanceId': instance_id, 'SubnetId': subnet_id, diff --git a/setup.py b/setup.py index 2b990ed9fc..43c9d221ad 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -__version__ = '0.79.0rc1' +__version__ = '0.79.0rc2' setup(