将服务与 Step Functions 集成 - Amazon Step Functions
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

将服务与 Step Functions 集成

学习如何致电其他人HTTPSAPIs并 Amazon Web Services 服务 与之集成 Amazon Step Functions.

致电其他 Amazon 服务

通过 Amazon 服务集成,您可以直接从工作流程中调用API操作和协调执行。你可以使用 Step Functions 的Amazon SDK集成直接从状态机调用 200 多个 Amazon 服务中的任何一个,这样你就可以访问九千API多个操作。或者,您可以使用 Step Functions 的优化集成,每个集成都经过自定义,可为您的工作流提供特殊功能。在这两种类型的集成中,都有一些API操作可用。我们建议尽可能地使用经优化的集成。

您可以直接从 Amazon States Language 中的 Task 状态协调这些服务。例如,使用 Step Functions,您可以调用其他服务用于:

  • 调用一个 Amazon Lambda 函数。

  • 运行作 Amazon Batch 业,然后根据结果执行不同的操作。

  • 从 Amazon DynamoDB 插入或获取一个项目。

  • 运行亚马逊弹性容器服务 (AmazonECS) 任务并等待其完成。

  • 在亚马逊简单通知服务 (AmazonSNS) 中发布到某个主题。

  • 使用亚马逊简单队列服务 (AmazonSQS) 发送消息。

  • 管理我们的 Amazon Amazon Glue A SageMaker I 的任务。

  • 构建用于执行 Amazon EMR 任务的工作流程。

  • 启动 Amazon Step Functions 工作流程执行。

Amazon SDK 集成

Amazon SDK集成的工作方式与使用. 的标准API调用完全相同。 Amazon SDK它们可以直接从你的状态机定义APIs中调用 200 多个 Amazon 服务中的 900 多个服务。

优化集成

Step Functions 对优化集成进行了自定义,为工作流环境提供特殊功能。例如,Lambda 将其API输出从转义后的对象Invoke转换为JSON对象。JSON Amazon BatchSubmitJob允许您在任务完成之前暂停执行。

有关经优化的集成的完整列表,请参阅将优化的服务与 Step Functions 集成

跨账户访问

Step Functions 提供对工作流程 Amazon Web Services 账户 中不同配置的资源的跨账户访问权限。使用 Step Functions 服务集成,您可以调用任何跨账户 Amazon 资源,即使该资源 Amazon Web Services 服务 不支持基于资源的策略或跨账户调用。

有关更多信息,请参阅 在 Step Functions 中访问其它 Amazon Web Services 账户中的资源

集成模式支持

标准工作流程和快速工作流程支持相同的集成,但支持的集成模式不同。

  • 标准工作流程支持请求响应 集成。某些服务支持 Run a Job (.sync)等待回调 (. waitForTask代币),在某些情况下两者兼而有之。有关详细信息,请参阅以下优化集成表。

  • 快速工作流程仅支持请求响应 集成。

为协助在两种类型之间做出选择,请参阅在 Step Functions 中选择工作流程类型

Amazon SDKStep Functions 中的集成

集成 服务 请求响应 运行任务:.sync 等待回电-. waitForTask代币
超过两百项服务 标准和快速 不支持 Standard

Step Functions 中的优化集成

集成 服务 请求响应 运行任务:.sync 等待回电-. waitForTask代币
Amazon API Gateway 标准和快速 不支持 Standard
Amazon Athena 标准和快速 Standard 不支持
Amazon Batch 标准和快速 Standard 不支持
Amazon Bedrock 标准和快速 Standard Standard
Amazon CodeBuild 标准和快速 Standard 不支持
Amazon DynamoDB 标准和快速 不支持 不支持
Amazon ECS/Fargate 标准和快速 Standard Standard
Amazon EKS 标准和快速 Standard Standard
Amazon EMR 标准和快速 Standard 不支持
Amazon EMR on EKS 标准和快速 Standard 不支持
Amazon EMR Serverless 标准和快速 Standard 不支持
Amazon EventBridge 标准和快速 不支持 Standard
Amazon Glue 标准和快速 Standard 不支持
Amazon Glue DataBrew 标准和快速 Standard 不支持
Amazon Lambda 标准和快速 不支持 Standard
AWS Elemental MediaConvert 标准和快速 Standard 不支持
Amazon SageMaker AI 标准和快速 Standard 不支持
Amazon SNS 标准和快速 不支持 Standard
Amazon SQS 标准和快速 不支持 Standard
Amazon Step Functions 标准和快速 Standard Standard