is any one able successfully connect to Redshift from lambda.
I want to fetch some records from Redshift table and feed to my bot (aws lex)
Please suggest - this code is working outside lambda how to make it work inside lambda.
import psycopg2
con=psycopg2.connect(dbname= 'qa', host='name',
port= '5439', user= 'dwuser', password= '1234567')
cur = con.cursor()
cur.execute("SELECT * FROM pk.fact limit 4;")
for result in cur:
print (result)
cur.close()
con.close()