Forums

Can't Connect to AWS rds from django app

I have a django app that locally connects fine to my aws rds. However I receive this message when attempting to connect. "Can't connect to MySQL server on 'disneydbinstance.c9lxpmnhtw8a.us-east-2.rds.amazonaws.com' (timed out)"

My outbound rules for my aws security group are set to allow all access, with the following settings:

  • Type: All Traffic
  • Protocol: All
  • Port Range: All
  • Destination: 0.0.0.0/0

I have no trouble connecting locally just from pythonanywhere

Had to change the inbound rules as well. Fixed it.

OK -- glad you worked it out!

What inbound rule you have setup to connect with rds can you please hep?

i am getting error, please help

Free accounts on PythonAnywhere can only make outbound HTTP and HTTPS connections, so you won't be able to connect to an external MySQL database without upgrading to a paid account.