From c047662f786f216433caafd2255c1bb28b28d65d Mon Sep 17 00:00:00 2001 From: KenF Date: Fri, 23 Jan 2026 08:59:50 +0800 Subject: [PATCH] feat: added account id to workbook title --- init_workbook.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init_workbook.py b/init_workbook.py index 27f1cae..18303ef 100755 --- a/init_workbook.py +++ b/init_workbook.py @@ -8,12 +8,18 @@ License: This program is released under the MIT License # Imports from openpyxl import Workbook from datetime import datetime +import boto3 + # Main function def main() -> None: + client = boto3.client('sts') + response = client.get_caller_identity() + accountId = response['Account'] + wb = Workbook() ws = wb.active - ws['A1'] = "AWS Inventory" + ws['A1'] = f"AWS Inventory for {accountId}" ws['A2'] = "Created on" ws['B2'] = datetime.now() wb.save('aws-inventory.xlsx')