'Can I trigger one Lambda function after successful completion of another Lambda function (without using Step Function)?
I have two AWS Lambda functions doing different things and I want to run the second Lambda only after the first one is completed. It's maybe something simple and I'd like to know how I can do that? I'm aware I can use Step Functions but I haven't used it much. Is this achievable without using Step Functions?
Solution 1:[1]
The first Lambda function can invoke another Lambda function before it exits. It can simply use a normal invoke() API call to the AWS Lambda service.
You would probably want to make this an asynchronous call, so that the first function does not wait for the second function to finish.
Solution 2:[2]
Yes, you can do this. The perfect tool for that is AWS Step Functions which would allow you to chain your functions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | John Rotenstein |
| Solution 2 | Marcin |
