当一个步骤函数的状态逐渐消失时,Lambda执行是否与之相关?

发布于 2025-02-09 23:52:19 字数 56 浏览 3 评论 0原文

我想知道是否继续执行lambda,即使步骤函数的状态与IT的状态相关联。如果发生,我该如何停止它?

I want to know if a lambda execution continues to be performed, even if the state of the step function correlated to it times out. If it happens, how can I stop it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝眸 2025-02-16 23:52:19

标准步骤函数的最高超时为1年。 !

(是

(Express Stepfunctions的

超时时间为30秒。

如果您需要lambda在一定时间内完成,最好通过将lambda超时设置为您可以为您服务 - 而不是状态机器。 (我在您的评论中看到您说您不能为此提供价值吗?如果您不能更改它,那么您别无选择,只能让它运行它的路线)

考虑步骤功能和状态机器作为编排者,但是他们几乎无法控制单个组件。他们告诉谁该行动,何时何时却被困住了,等待这些组件在继续之前回复。

如果您的lambda次数,它将导致您的statemachine失败该任务,因为它会收到lambda服务错误。然后,您可以在步骤函数中处理它,而不会失败,请参见:

https://docs.aws.amazon.com/step-functions/latest/dg/conpepts-error handling.html

您可以专门使用:time> time> timeoutseutsecondspath 在您的定义中,如果任务时间段设置特定结果。

但是,如前所述,不,一旦兰伯达开始执行,它将继续直到完成或在15分钟 /其设定的超时到达。

Standard StepFunctions have a max timeout of 1 year. (yes! One year)

As such any individual task also has a max timeout of 1 year.

(Express StepFunctions have a timeout of 30 seconds mind you)

Lambda's have a max time out of 15 mins.

If you need your lambda to complete in a certain amount of time, you are best served by setting your lambda timeout to that - not your state machine. (i see in your comments you say you cannot pass a value for this? If you cannot change it then you have no choice but to let it run its course)

Consider StepFunctions and state machines to be orchestrators, but they have very little control over the individual components. They tell who to act and when but otherwise are stuck waiting on those components to reply before continuing.

If your lambda times out, it will cause your StateMachine to fail that task as as it receives a lambda service error. You can then handle that in the StepFunction without failing the entire process, see:

https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html

You could specifically use: TimeoutSecondsPath in your definition to set a specific result if the task timesout.

But as stated, no, once a lambda begins execution it will continue until it finishes or it times out at 15 mins / its set timeout.

白龙吟 2025-02-16 23:52:19

没有任何方法可以杀死跑步的兰伯达。但是,您可以将并发限制设置为0,以阻止其开始进一步执行。

There isn't any way to kill a running lambda. However, you can set concurrency limit to 0 to stop it from starting further executions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文