I have a csv file on mobile in swift, I would like to pass it to AWS lambda for it to then process the file.
I read up that APi gateway can send it as a binary, however there may be situations where the file becomes 20MB in size, and so this does not seem like a reasonable way.
I did think of another solution, which was to upload to s3, then make s3 trigger a lambda function, and then use it as so.
The problem I had with this solution is that the processing must be done in realtime, and uploading to s3 may take a while, the user would be waiting for file upload, then lambda processing and then the response of the lambda, I do not think this would complete in lets say 5 seconds for a file with 200k records, and a complex processing algorithm?
Also, may I ask; theoretically if the file size was below or around 10MB what would be the best solution?
Thanks
Edit:
I was also thinking of using cloudfront, but there was sometimes delay in when the file was uploaded and when it became available, and I would only like the files to be available for a brief couple of minutes in the cache.