AWS Lambda。延迟调用 [英] AWS Lambda. Invoke with delay

查看:175
本文介绍了AWS Lambda。延迟调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Amazon工具构建任务计划程序。主要问题是我需要一次延迟执行任务(可能要花几个小时或几周)。

I need to build "tasks scheduler" with Amazon tools. Main problem that i need execute task once with huge delay (it may be a few hours or few weeks).

我尝试研究如何使用CloudWatch和Lambda构建它功能。据我了解-我需要为一个超时执行使用单独的规则。
但是AWS仅允许我100个规则/帐户。

I try to research how to build it with CloudWatch and Lambda function. As i understand - i need to use separate rule for one timeout execution. But AWS allow me only 100 rules/account.

可能我走错了路,并且此工具不适合我的任务。

Probably i'm going wrong way and this tools not intended for my task.

我也尝试了SQS,但它不允许我将超时设置为15分钟以上。最简单的方法-将自己的mircoservice与crone一起使用,但我希望可以在云中完成它)

Also i tried SQS, but it did't allow me to set timeout more than 15 minutes. The simplest way - use own mircoservice with crone, but i hope that it is possible to do it in cloud )

可能是有人遇到相同的问题并可以与我分享

May be someone has the same issue and can share with me thoughts about the implementation of this?

推荐答案

您可能可以使用 AWS步骤功能的等待状态。我自己还没有使用过它,但是似乎可以定义一个状态机,在该状态机中,可以使用lamdba函数的结果来确定等到下一步函数为止的时间。

You may be able to use AWS Step Functions Wait State for this. I haven't used it myself but it seems like you can define a state machine where the result of a lamdba function can be used to determine how long to wait until the next step function.

或者,我的API https://posthook.io 能够向位于以下位置的已定义端点发出HTTP POST请求具体时间。

Alternatively, my API https://posthook.io is able to make HTTP POST requests to defined endpoints at specific times.

这篇关于AWS Lambda。延迟调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆