Connect to AWS RDS Postgres database with python

0 votes

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==2.7.6.1 mysqlclient==1.4.1

With:

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? 

Apr 12 in IoT (Internet of Things) by Rahul
• 8,980 points
90 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In IoT (Internet of Things)

0 votes
1 answer

How to work a AWS IOT Lambda with a devices?

Hey KanaguRaj, use this for reference: https://serverless.com/ ...READ MORE

answered Apr 12, 2019 in IoT (Internet of Things) by Vardhan
• 13,200 points
346 views
0 votes
1 answer

What to do with "Unexpected indent" in python?

Unexpected indent error occurs when there is ...READ MORE

answered Feb 9 in IoT (Internet of Things) by Dev
• 6,000 points
32 views
0 votes
1 answer

Connect Android Things based Raspberry Pi 3 to wifi network for the first time!

Hey, I think its alright!  Your Raspberry Pi ...READ MORE

answered Jul 19, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
663 views
0 votes
1 answer

How to connect Raspberry Pi and lighting the LED?

You might want to try instead to ...READ MORE

answered Jul 23, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
249 views
0 votes
1 answer

AWS IoT - Access shadow through .Net, REST, with certificate

If you want to publish and/or subscribe ...READ MORE

answered Jul 25, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
1,285 views
0 votes
1 answer

IOPS or Throughput?

Configure your database driver to print statistics ...READ MORE

answered Nov 14, 2018 in AWS by Theodor
• 740 points
192 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP