I am trying to connect my local django application to amazon RDS (tried with both MySQL and PostgreSQL) but I am not able to connect as it shows the following errors, Currently seeking answer for PostgreSQL.
In my Settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'database_name',
'USERNAME': 'my_username',
'PASSWORD': 'my_password',
'HOST': 'database-abc.xxx.us-region-yyy.rds.amazonaws.com',
'PORT': '5432',
}
}
In AWS database configuration:
I get this error:
django.db.utils.OperationalError: could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "database-abc.xxx.us-region-yyy.rds.amazonaws.com" (69.420.00.121) and accepting TCP/IP connections on port 5432?
I referred to all the available data but still am unable to resolve this issue!
Thanks in advance!