Search code examples
mysqlamazon-web-servicesamazon-rdsaws-serverlessaws-aurora-serverless

How to connect to RDS aurora serverless MYSQL private DB using Boto3?


I tried searching ways to connect to RDS aurora serverless MYSQL private db found a way here, but it is asking secret arn of the DB, unable to find that one out can anyone help me with the way to generate secret ARN or a way to connect to RDS aurora serverless MYSQL private db i am able to fetch all remaining details for the option mentioned in the above link, steps i am following:

  1. created RDS aurora serverless MYSQL private db
  2. connected a ec2 instance
  3. generating python script to connect to rds if you suggest any alternative, that is also fine, TIA

Solution

  • The issue is solved, the detailed explanation is there in amazon docs. Add an IAM role for your EC2 instance and try giving your db password in the passwd field of above mentioned code. feel free to contact if needed, apologies for the poor answer structure(a newbie trying to help community) :)