简体   繁体   English

aws 步函数/状态机,你可以启动并忘记吗?

[英]aws step function/state machine, can you launch and forget?

considerations:考虑因素:

  • I have a step that will probably take longer than a lambda can wait.我有一个步骤可能需要比 lambda 等待更长的时间。
  • the step involves a s3 copy (terabytes of data)该步骤涉及 s3 副本(TB 级数据)
  • I don't need to wait for the successful result我不需要等待成功的结果

Do I need to wrap the state machine in something like launching it from a docker container?我是否需要将状态机包装在类似从 docker 容器启动它的东西中? (because docker can wait longer than a lambda for the return value which I don't need) or can I launch this state machine from a lambda and not wait for the result. (因为 docker 可以比 lambda 等待更长的时间来获取我不需要的返回值)或者我可以从 lambda 启动这个状态机而不等待结果。

Step Functions Standard Workflows executions can run for up to 1 year. Step Functions Standard Workflows执行最多可以运行 1 年。 The workflow execution will run asynchronously during that time and you can monitor the progress from the console, CLI, or SDK.工作流执行将在此期间异步运行,您可以从控制台、CLI 或 SDK 监控进度。 This is completely managed and you don't need to run any processes, such as a Docker container, on your side to keep it going.这是完全托管的,您不需要在您这边运行任何进程(例如 Docker 容器)来保持它的运行。

That said, Step Functions will orchestrate the actions over the course of that period but you will still need to implement the tasks that it will orchestrate.也就是说,Step Functions 将协调该期间的操作,但您仍然需要实施它将协调的任务。 For a bulk S3 copy, it seems you may be running a docker container to do the actual copy in which case you could use the Service Integration with ECS (including Fargate) to make that easier.对于批量 S3 副本,您似乎正在运行一个 docker 容器来执行实际副本,在这种情况下,您可以使用服务集成与 ECS(包括 Fargate)来简化操作。

Alternatively, you could the new Distributed Map capability to avoid needing to write any code in Lambda or Container if the source and destination bucket are in the same region.或者,如果源和目标存储桶位于同一区域,您可以使用新的分布式映射功能来避免在 Lambda 或 Container 中编写任何代码。 This is an example of a bulk delete that could be easily modified to do a copy.这是批量删除的示例,可以轻松修改以执行复制。

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

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