I created an AWS Lambda function that:
- register on Redshift via JDBC URL
- runs a request
Locally, using Node, I can successfully connect to the Redshift instance via JDBC and execute the request.
var conString = "postgresql://USER_NAME: PASSWORD@JDBC _URL"; var client = new pg.Client(conString); client.connect(function(err) { if(err) { console.log('could not connect to redshift', err); }
However, when I execute the function on AWS Lambda (where it is wrapped in an async # waterfall block), AWS Cloudwatch logs tell me that AWS Lambda was turned off after 60 seconds.
Any ideas on why my function cannot connect?
Kevin meredith
source share