I'm trying to connect to my Redshift
database from my AWS Lambda
function:
con = psycopg2.connect(
dbname="my_dbname",
host="my_url",
port= 5439,
user="username",
password="my_password")
cur = con.cursor()
But I can't access my database, my function raises the following error:
OperationalError: could not connect to server: Connection timed out
Is the server running on host "my_url" (54.217.83.88) and accepting
TCP/IP connections on port 5439?
Can i get some help with this please ? (and if possible I'd like to have a very detailed answer, because I'm new to AWS )
PS: I know that I have to configure the VPC, but I don't know what to do exactly
Thanks you in advance