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..

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南