使用步骤函数执行 AWS Datasync 任务

huangapple go评论73阅读模式
英文:

Execute AWS Datasync task using step function

问题

什么资源字符串用于执行数据同步任务?

英文:

We have a requirement to create a state machine which includes to datasync tasks followed by each other. These datasync tasks are already created and now I want to execute it using step functions one after another. What is the resource to execute a datasync task.
For eg: For executing a Glue Job we give Resource:arn:aws:states:::glue:startJobRun.sync

What Resource string is used for executing a datasync task?

答案1

得分: 1

Step Functions 通过 AWS SDK Service IntegrationsAWS DataSync 集成。 Resource 字符串将采用以下格式: arn:aws:states:::aws-sdk:datasync<&lt;api-action&gt;

查找这类信息的最简单方法是使用 Workflow Studio。正如您可以在下面的图像中看到的那样,它允许您搜索可用的服务和 API 操作,以找到您需要的内容,然后只需将其拖到工作流中。

使用步骤函数执行 AWS Datasync 任务

Step Functions 不具有 DataSync 的优化集成,因此仅支持请求-响应集成模式。因此,我认为您可能会希望使用作业轮询模式(Workflow Studio 也在这方面为您提供帮助),以启动任务执行,然后监视完成。

使用步骤函数执行 AWS Datasync 任务

为了更容易重复使用,您可能希望在状态机中实现此功能,然后在需要时从其他状态机中调用它。 这篇博文 对如何使用 Glue Crawler 做类似的事情进行了详细说明,但其中的许多内容都是适用的。

英文:

Step Functions integrates with AWS DataSync using AWS SDK Service Integrations. The Resource string will be of the form arn:aws:states:::aws-sdk:datasync:&lt;api-action&gt;

The easiest way to find this sort of information is with Workflow Studio. As you can see in the image below, it allows you to search through available services and api actions to find what you need, then just drag it into your workflow.

使用步骤函数执行 AWS Datasync 任务

Step Functions does not have an Optimized Integration for DataSync and therefore only supports the Request Response integration pattern. As such, I suspect you will want to use the Job Poller pattern (Workflow Studio helps you here as well) to start the task execution then monitor for completion.

使用步骤函数执行 AWS Datasync 任务

For easier re-use, you might want to implement this in a state machine that you can then reuse by calling it from other state machines when needed. This blog post goes into detail on how to do a similar thing with Glue Crawler, but much of it will be applicable.

huangapple
  • 本文由 发表于 2023年4月7日 03:30:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/75953123.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定