diff --git a/aws-ec2.py b/aws-ec2.py index a317cfe..0856a91 100755 --- a/aws-ec2.py +++ b/aws-ec2.py @@ -27,10 +27,7 @@ def printResources(region_name: str) -> list[list[str | int]]: if tag['Key'] == "Name": name_tag = tag['Value'] break - osPlatform = "Linux" - if i.get('Platform') == "Windows": - osPlatform = "Windows" - return_data.append([i['InstanceId'], name_tag, osPlatform, i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']]) + return_data.append([i['InstanceId'], name_tag, i.get('PlatformDetails'), i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']]) return return_data # Main function