InterfaceError when using SQLAlchemy with Redshift

Hey, community!

I’m using pandas.read_sql_query with an SQLAlchemy engine to connect to Redshift on Streamlit Cloud (locally everything works fine) but I’m facing the following error:

sqlalchemy.exc.InterfaceError: (redshift_connector.error.InterfaceError) ('communication error', TimeoutError(110, 'Connection timed out'))
(Background on this error at:

After accessing the link provided in the error, I followed the instructions on Handling Disconnects, but still no progress.

Any guesses?

The problem was not Streamlit related, but regarding security when connecting to the db from an external source.