I've created a PostgreSQL database on AWS, which I want to use for a Django project.
I've modified settings.py so that it has
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': <db name>,
'USER': <user>,
'PASSWORD': <password>,
'HOST': 'projectdevelopment.foobar.us-east-1.rds.amazonaws.com',
'PORT': '5432',
}
}
Which I would have thought seemed pretty straightforward. Except that when I try to make a migration I get this error:
django.db.utils.OperationalError: could not translate host name "projectdevelopment.foobar.us-east-1.rds.amazonaws.com" to address: nodename nor servname provided, or not known
The value projectdevelopment.foobar.us-east-1.rds.amazonaws.com
has been copied directly from the value under endpoint in the RDS console.
Am I missing a setting, or misconfigured? Or both?