I have lambda which returns bunch of records from a database. I iterate through each of the record and invoke another lambda. After all the rows are complete, I would like to call another lambda which does some validation and sends out an email.
I am able to achieve this flow using Iterate pattern (https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-create-iterate-pattern-section.html)
The issue is the call to lambda for each of the row is synchronous i.e the loop wait for the lambda to complete before invoking for the next row. This is not acceptable for our requirement as we want the step function to complete in few seconds.
I would like to know if there is way to make the call to lambda in loop asynchronous and that the final step can wait for all lambda instance to complete and continue with further processing.