[英]AWS Lambda step function Integration
I am calling a lambda from a step function and it waits for callback.(The lambda runs some python code which calls few other AWS services like batch jobs) Even though my lambda completed (batch job ran successfully),the step function is still waiting for call back.我从步骤 function 调用 lambda 并等待回调。(lambda 运行一些 python 代码,它调用一些其他 AWS 服务,如批处理作业)即使我的 lambda 完成(批处理作业成功运行),步骤 883480908406 仍在等待回电。 I am assuming once the lambda is executed,it automatically passes the task token to step function.I haven't written any code for manually returning the token.
我假设一旦 lambda 被执行,它会自动将任务令牌传递给步骤 function。我没有编写任何代码来手动返回令牌。 Please correct me If I am wrong and help.
如果我错了请纠正我并提供帮助。
For async jobs in aws you will have a describe function like this one .对于 aws 中的异步作业,您将拥有一个像这样的 describe function 。 You can create a step function step that waits for some time and then triggers another lambda that will decide by the response of the describe boto3 (if python) if to run the waiter again or move to next, essentially creating a loop in the state machine.
您可以创建一个步骤 function 等待一段时间然后触发另一个 lambda 这将由 describe boto3(如果是 python)的响应决定是否再次运行服务员或移动到下一个,实质上是在 state 机器中创建一个循环. This is a good explanation of the idea: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html
这是对这个想法的一个很好的解释: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.