I received a timeout when trying to perform 7000 * 3 inserts into MariaDB in 30 seconds with AWS Python Lambda. I have three ideas how to get around the 30 second API Gateway timeout:
Convert the data to a file which MariaDB can import using
LOAD_DATA_INFILEand let the Lambda do that.
Write the data in a file to S3 and let another function write the data from S3 to MariaDB which then will not have the API Gateway timeout limit.
I am leaning towards the first strategy, to try and use
LOAD_DATA_INFILE from the Lambda function. Do you agree?