How can i trigger Lambda 2 based on Lambda 1 status(Only Success) without modifying Lambda1 configuration.

0

How can i trigger Lambda 2 based on Lambda 1 status(Only Success).

質問済み 7ヶ月前180ビュー
2回答
1

Hello.

How about emitting an event to EventBridge at the end of processing?
You can send custom events to EventBridge by using the put_events() API.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/events/client/put_events.html

Another method is to use StepFunctions to create a configuration that executes a subsequent Lambda when the Lambda succeeds.
https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html

I think the simplest thing to do is to set up Lambda2 to be executed by calling the SNS topic when Lambda1 is successful.
https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations

profile picture
エキスパート
回答済み 7ヶ月前
0

If you can't event change the configuration (why not?), you can invoke a state machine instead of Lambda1 and the state machine will invoke Lambda1 and based on the answer it will invoke Lambda2.

Lambda does not emit events by default for success of failure invocations.

profile pictureAWS
エキスパート
Uri
回答済み 7ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン