Why I'm receiving the 'Connection time out' when I try to run the 'python manage.py migrate' code on putty?

41 Views Asked by At

Ok, I'm trying to deploy a Django project using EC2 instance

I've already created an RDS/Postgree database and test it through my IDE before deploy it and it's working correctly

But when I try to run the 'python manage.py migrate' code on putty I'm receiving this error

angtradingdb.xxxxxxx.rds.amazonaws.com" (xxxxxxx), port 5432 failed: Connection timed out

I've set 2 inbound rules on my RDS instance:

  • First I put PostgreSQL as 'Type', 'TCP' as Protocol, 5432 as 'Port Range' and my IP as 'Source'
  • Second inbound rule, it's the same thing but the VPC security group of my EC2 application as 'Source'

I've done that before and those 2 rules where enough for the deployment to work

Any idea of what can be causing this error?

1

There are 1 best solutions below

3
Olivjr7 On

Try a connectivity test from your ec2. Open the console in your ec2 and try with

telnet IP(rds) Port(rds)

If in the case exists connection, review the connection configuration in your project.