Fetch 0.5 million reocrds at once from redshift using nodejs.

0

I am trying to fetch 0.5 million records at once using API->lambda. I am executing this using nodejs and while fetching records programmatically using SQL query my API times out as it redshift response takes more time. I am using redshift data API to fetch records. while using this "ExecuteStatement" gives metadata. Now while formating columnmetadata and records fetched under "GetStatementResult" takes a lot of time to get result in proper format. Is there a way to get foramtted data directly and reduce time?

1 Answer
0

To avoid the time limit, you could move the script into Glue. If you wanted to keep using Lambda to execute the APIs, you could create Step Functions to have Initiate Query Lambda -> Return results to S3 Lambda -> Process results Glue.

AWS
evaleah
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions