wonderful-sandwich-45250
12/10/2020, 3:45 AMswift-printer-82590
12/10/2020, 4:26 AMgorgeous-tent-29765
12/10/2020, 4:37 AMwonderful-sandwich-45250
12/10/2020, 4:51 AMwonderful-sandwich-45250
12/10/2020, 4:52 AMwonderful-sandwich-45250
12/10/2020, 6:41 AMgorgeous-tent-29765
12/10/2020, 9:30 AMthread.join()
after you start the thread.
After you return, AWS Lambda has finished execution of the main routine and will halt the process.
The reason it is working for you locally maybe because you are running a Flask server using python app.py
.
QQ: Why is the need here for a single thread? Ideally, all of the code inside the for loop should be in their own thread to leverage concurrency.wonderful-sandwich-45250
12/10/2020, 12:48 PMthread.join()
then I have to wait till I get the thread gets executed. Which I dont want, I want to start the thread and return the response and let the thread running in background and upload csv file to s3gorgeous-tent-29765
12/10/2020, 1:12 PM