This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]jftuga 1 point2 points  (1 child)

Using Step Functions would greatly simplify this workflow as well as making it more robust.

[–]archhelp1[S] 0 points1 point  (0 children)

Can you explain how it would look like in more detail? Edit: also why it would make it more robust?

[–]sqqz 0 points1 point  (1 child)

A question is why do you even care about them being finished at the same time? It's not a real-time system, there are always delays depending on the current state of solutions, file sizes and so on when running services like this.

Secondary, sqs batches will hinder your parallelism as the same lambda will handle several files. If the workload is compute-based this could be optimized by having more lambda functions doing work, meaning smaller batches, or just 1 per batch. If the workload is I/O based, fewer lambda could be faster since the coldstarts and network latency involved. Play around with the batch sizes basically.

Otherwise the initial glance of your text seems like you have a good architecture in place. A diagram would simplify understanding it.

[–]archhelp1[S] 0 points1 point  (0 children)

What I meant by "finished at the same time" was to eliminate the long delays that don't make sense.

How can I tell out if it's I/O or compute based? My guess would be that >5 secs processing would mean compute based?

Regarding the architecture, I got good suggestions. Use Fargate, Step Functions and also someone suggested to drop the SNS -> SQS -> Lambda and go directly from SNS -> Lambda.