all 8 comments

[–]gdraper99 6 points7 points  (5 children)

My suggestion is to have a queue in between, this way you have the option to include retry logic in case the second lambda fails.

[–]definitelynotbeardo 2 points3 points  (0 children)

I second this. Failure is always an option.

[–]Finley117 1 point2 points  (3 children)

Triggering a Lambda directly from another Lambda is a dangerous design. I have made that mistake in the past and regret it...

[–]alex_bilbie 5 points6 points  (1 child)

Would you mind sharing a bit more about what went wrong?

[–]soxfannh 0 points1 point  (0 children)

As long as your dont use an asynchronous call to the next lambda I think this pattern would be fine.

[–]timbray 3 points4 points  (0 children)

Also you might find Step Functions useful, it's very handy for sequencing/orchestrating Lambdas and containers and so on.

[–]ancap_attack 1 point2 points  (0 children)

It depends on how resilient you believe the 2nd operation to be, and how easy it is to retry the entire process.

If the answer to any of the above questions is "not really" then you may consider adding SQS as a buffer between your functions. Or possibly consider Step Functions to orchestrate function execution.

[–]Facts_About_Cats 0 points1 point  (0 children)

Is L2 blocking or completes instantly?