简体   繁体   English

我可以在成功完成另一个 Lambda function 后触发一个 Lambda function(不使用 Step Function)吗?

[英]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.我有两个 AWS Lambda 函数做不同的事情,我只想在第一个完成后运行第二个 Lambda。 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.我知道我可以使用 Step Functions,但我用得不多。 Is this achievable without using Step Functions?这是否可以在不使用 Step Functions 的情况下实现?

Yes, you can do this.是的,你可以这样做。 The perfect tool for that is AWS Step Functions which would allow you to chain your functions.完美的工具是AWS Step Functions ,它允许您链接您的函数。

The first Lambda function can invoke another Lambda function before it exits.第一个 Lambda function 在退出之前可以调用另一个 Lambda function。 It can simply use a normal invoke() API call to the AWS Lambda service.它可以简单地使用普通的invoke() API 调用 AWS Lambda 服务。

You would probably want to make this an asynchronous call, so that the first function does not wait for the second function to finish.您可能希望将其设为异步调用,以便第一个 function 不会等待第二个 function 完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM