{
  "output": "Successfully created and wrote to new file: /Users/bob/git/dxw/aws-stuff/audits/rds.py. Here is the updated code:\nimport boto3\nfrom botocore.exceptions import ClientError, ProfileNotFound\nfrom aws_utils import setup_org_accounts_session\n\ndef fetch_rds_resources(rds_client):\n    \"\"\"\n    Fetches RDS instances and clusters names.\n    Returns a list of strings.\n    \"\"\"\n    resources = []\n    try:\n        # Instances\n        paginator = rds_client.get_paginator(\"describe_db_instances\")\n        for page in paginator.paginate():\n            for db_instance in page[\"DBInstances\"]:\n                resources.append(db_instance[\"DBInstanceIdentifier\"])\n        \n        # Clusters\n        paginator = rds_client.get_paginator(\"describe_db_clusters\")\n        for page in paginator.paginate():\n            for db_cluster in page[\"DBClusters\"]:\n                resources.append(db_cluster[\"DBClusterIdentifier\"])\n    except ClientError as e:\n        print(f\"Error fetching RDS resources: {e}\")\n        \n    return resources\n\ndef run():\n    \"\"\"Main entry point for RDS audit.\"\"\"\n    for account, profile_name in setup_org_accounts_session():\n        account_id = account[\"Id\"]\n        account_name = account[\"Name\"]\n        try:\n            account_session = boto3.Session(profile_name=profile_name)\n            rds_client = account_session.client(\"rds\")\n\n            names = fetch_rds_resources(rds_client)\n            for name in names:\n                print(f'\"{account_name}\":\"{name}\"')\n\n            if names:\n                print(f\"Processed account '{account_name}' (ID: {account_id})\")\n        except (ClientError, ProfileNotFound) as e:\n            print(f\"Error accessing account '{account_name}': {e}\")\n\n    print(\"\\nRDS names have been successfully listed for all accounts.\")\n\nif __name__ == \"__main__\":\n    run()\n"
}