Trying to connect to database using Postgres but it isn't able to translate the address on Amazon server to Amazon database

Getting this error when trying to connect to a database on Amazon. This is from an Amazon server.

psycopg2.OperationalError: could not translate host name “domain-stg-postgres.caxdkvuertc9.us-west-1.rds.amazonaws.com/projectname_dev” to address: Name or service not known

I’m setting this here:

db["host"] = parser['ebean.datasource.databaseUrl'].replace("${ebean.datasource.name}", db_name)

Why would my host name not be working? Am I missing something obvious here?

This seems to be an Amazon specific problem?

Solution:

This is your hostname: domain-stg-postgres.caxdkvuertc9.us-west-1.rds.amazonaws.com this is your database name projectname_dev. You shouldn’t have /projectname_dev as part of the hostname.