How to get all compute resources connected with an RDS database programmatically?

0

I can view the connected compute resources in the management console. But how can I get all the ec2 instances conencted to an RDS database programatically in Python? If not directly, Is there any way i can indirectly get the details (Eg. Security grp)??

1 回答
0

At a network level you could do this with VPC Flow Logs - but that's not going to be in real-time.

You haven't said which RDS flavour you're using but most databases give you the ability to run a query/command which will return the clients which are connected. For example, MySQL: https://dataedo.com/kb/query/mysql/list-database-sessions - you could run those commands in a Python script which is connected to the database.

What are you going to use the list for?

profile pictureAWS
专家
已回答 6 个月前
  • Thanks. I will definitely try it out. I am just a beginner in cloud and to make myself familiarize with APIs and boto3, I am fetching details..

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则