I have created a lambda that iterates over all the files in a given S3 bucket and deletes the files in S3 bucket. The S3 bucket has around 100K files and I am selecting and deleting the around 60K files. I have set the timeout for lambda to max (15 minutes) timeout value. The lambda is consistently returning "network error" after few minutes though it seems to run in the background for sometime even after the error is returned. How can get around this?
I was testing another function and this error came up as a result. Reading a little in the documentation I found that I activated the throttle option, that it reduces the amount of rate for your function.
The solution is to create another function and see if the throttle is making that error.
AWS Lambda : Calling the invoke API action failed with this message: Network Error