I want to process different batch files using S3-SQS-Lambda architecture and looking at 3 possible design approaches
Option 1 - Process batch file as a whole at once
- File delivered to S3
- First Lambda will trigger and create message in SQS
- Second lambda will trigger and will process batch file at once
Option 2 - Process batch file with each message processed separately
- File delivered to S3
- First Lambda will trigger and create messages in SQS per each line in batch file with each line corresponding to a message
- Second Lambda will trigger and will process one message at a time
Option 3 - Process batch file with multiple messages processed concurrently
- File delivered to S3
- First Lambda will trigger and create messages in SQS per each line in batch file with each line corresponding to a message
- Second Lambda will trigger and will process multiple messages at a time
I am inclined to use option 3 as it seems to be middle option from architecture, scalability, processing/cost standpoint, but would like pointers from experts on how they compare these options.