Remote database connection

Hi everyone,
I am very new to frappe and I stumbled upon problem and I need your help for that.

The problem is I have hosted the database using aws rds which is working fine with my local copies. At the same time I want to use the same database for other copies which is in my friends machine.

So, far I have done created new site using bench new-site and then bench use and finally this command bench set-mariadb-host {my rds isntance endpoint}. Is this the correct process? anyway after following those steps I get error like pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on ‘some url’ ([Errno -2] Name or service not known)”)

How can I achieve this, is there any process/ steps which I can follow? I would really appreciate your help and time.

Pretty sure ERPNext remote database’s have to have valid ssl working with them.

Okay, but are the above steps mentioned correct? Could you elaborate more on how can I achieve that?