diff --git a/aws-ddb.py b/aws-ddb.py index 16d1e8d..f565cd0 100755 --- a/aws-ddb.py +++ b/aws-ddb.py @@ -21,7 +21,7 @@ def getResources(region_name: str) -> list[list[str | int]]: for t in table_names: resp2 = client.describe_table(TableName=t) i = resp2['Table'] - return_data.append([i['TableName'], i['TableStatus'], i['TableSizeBytes'], i['ItemCount'], region_name]) + return_data.append([i['TableName'], i['TableStatus'], i['TableSizeBytes'], i['ItemCount'], i['BillingModeSummary']['BillingMode'], region_name]) return return_data # Main function @@ -30,7 +30,7 @@ def main() -> None: wb = load_workbook('aws-inventory.xlsx') ws = wb.create_sheet("DynamoDB") - ws.append(["TableName", "TableStatus", "TableSizeBytes", "ItemCount", "Region"]) + ws.append(["TableName", "TableStatus", "TableSizeBytes", "ItemCount", "BillingMode", "Region"]) with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor: results = executor.map(getResources, projectlib.aws.getRegions()) for region_rows in results: