如何在风扇架构中安排ECS任务

发布于 2025-02-12 20:04:18 字数 679 浏览 1 评论 0原文

我有一个我想上传到S3的视频。上传视频后,我想运行三个ECS任务a,b,c(每个任务获得相同的video_id)。这些ECS任务将许多行上传到DynamoDB表(ECS任务a上传到表ab to bC to c)。表中的每一行都包含video_id

任务a,b,c完成后,我希望该任务z将运行(任务z从表中获取数据a,b ,C)。

如何以最简单的方式将文件上传到S3之后,如何触发这三个ECS任务,以及如何在a,b,c之后触发ECS任务z到表a,b,c

PSI更喜欢事件驱动的解决方案。

I have a video which I want to upload to S3. After uploading the video I want to run three ECS tasks A,B,C (each tasks get the same video_id). Those ECS tasks upload many rows to Dynamodb tables (ECS task A uploads to Table A, B to B, C to C). Each row in the tables contains the video_id.

After tasks A,B,C finish, I want that task Z would run (task Z takes data from Tables A,B,C).

How do I trigger those three ECS tasks after uploading file to S3 in the simplest way, and how to trigger ECS task Z after A,B,C finishing uploading rows for video to tables A,B,C?

P.S.I prefer event driven solution.

enter image description here

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

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

发布评论

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

评论(1

南城追梦 2025-02-19 20:04:19

创建一个具有平行状态有三个分支,每个分支都分别调用ECS任务A,B和C。

在步骤函数中配置最终状态以运行任务Z,并将此状态配置为取决于先前的并行状态。

然后,使用 s3事件通知S3对象上传的步骤函数

Create an AWS Step Function that has a parallel state, with three branches, with one state each, that invoke the ECS tasks A,B and C respectively.

Configure a final state in the step function to run task Z, and configure this state to depend on the previous parallel state.

Then, use S3 event notification to invoke the Step Function on S3 object uploads.

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