Django connecting localhost PgSQL but not to remote DB (AWS RDS)
I have a Django project which is using the PostgreSQL as DB service. In local DB, everything is working fine.
But when I try to connect to PostgreSQL instance in AWS RDS, it does not connect. The credentials to connect are correct and I'm able to connect to DB using command line, Dbeaver (a DB tool) and TablePlus (another DB tool)
Local DB configs
DATABASES = {
"default": {
"ENGINE": 'django.db.backends.postgresql',
"NAME": 'my_db_name',
"USER": 'my_user',
"PASSWORD": 'my_password',
"HOST": 'localhost',
"PORT": '5432',
}
}
Remote DB configs
DATABASES = {
"default": {
"ENGINE": 'django.db.backends.postgresql',
"NAME": 'my_db_name',
"USER": 'my_user',
"PASSWORD": 'my_password',
"HOST": 'xxxxx.xxxxxx.us-east-2.rds.amazonaws.com',
"PORT": '5432',
}
}
Am I missing anything here?