Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger lambda after completion of another lambda?

I have two python scripts that I want to run one after another.

Script1 has a trigger on a S3 bucket. After script1 is done, I want to immediately trigger script2.

I am not finding how to set this trigger, but am finding how to chain lambdas and trigger them from inside script1. I think I do not want this. Open to all suggestions.

like image 361
RustyShackleford Avatar asked Feb 22 '26 15:02

RustyShackleford


1 Answers

You're looking for a Lambda trigger based on the "Function Invocation Finished" event. This isn't something natively supported by AWS as far as I'm aware. If you want to keep the functions decoupled, I would have the first function post to an SNS topic whenever it completes, and then have your 2nd function subscribe to that SNS topic.

like image 85
Mark B Avatar answered Feb 24 '26 07:02

Mark B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!