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 Answer
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
EXPERT
answered 5 months ago
  • 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..

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions