I have an existing Postgres table in RDS with a database name my-rds-table-name
I've connected to it using pgAdmin4 with the following configs of a read-only user:
host_name = "my-rds-table-name.123456.us-east-1.rds.amazonaws.com" user_name = "my_user_name" password = "abc123def345"
I have verified that I can query against the table.
However, I cannot connect to it using python:
SQLAlchemy==1.2.16 psycopg2-binary==126.96.36.199 mysqlclient==1.4.1
import psycopg2 engine = psycopg2.connect( database="my-rds-table-name", user="my_user_name", password="abc123def345", host="my-rds-table-name.123456.us-east-1.rds.amazonaws.com", port='5432' )
It fails with
psycopg2.OperationalError: FATAL: database "my-rds-table-name" does not exist
Similarly, if I try to connect to it with sqlalchemy:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: database "my-rds-table-name" does not exist
What am I missing? Please provide a few leads for my help, please?