I have a python 3.6 script that needs to get executed on AWS Lambda. The script needs to establish a connection to RedShift - being done through psycopg2.
The deployment package has been created with the appropriate compatible psycopg2 version.
When establishing a connection - i.e., conn = psycopg2.connect(...) -, the script times out at thresholds from ranges as small as 5 seconds to ranges as large as 5 minutes (when executing the script locally, it takes less than 5 seconds).
If I remove the connection statement (i.e., conn = psycopg2.connect(...)), the script does not time out - the success prompt gets produced instantaneously.
If anyone experienced a similar issue, your input would be very much appreciated.
The wheels keep spinning