如何使用API​​网关调用AWS步骤功能? [英] How to Invoke AWS step function using API gateway?

查看:164
本文介绍了如何使用API​​网关调用AWS步骤功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Amazon的文档,可以使用HTTP API调用step函数.

According to Amazon's documentation, step function can be invoked using HTTP API.

步骤功能可以与步骤功能一起访问和使用 控制台,AWS开发工具包或HTTP API.

Step Functions can be accessed and used with the Step Functions console, the AWS SDKs, or an HTTP API.

我试图搜索详细信息,但似乎找不到任何好的信息.有谁知道如何使用API​​网关调用AWS步骤功能,类似于调用Lambda函数的方式吗?

I tried to search the detailed information, but can't seem to find any good ones. Does anyone know how to invoke AWS step function using API gateway, similar to the way it invokes Lambda functions?

推荐答案

如果您需要从API网关调用StepFunction,现在可以在文档中进行详细说明:

If you need to call StepFunction from API Gateway, it's now possible and described well in docs: https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-api-gateway.html

  • 对于集成类型,选择AWS Service
  • 对于AWS服务,从列表中选择Step Functions
  • 对于HTTP方法,从列表中选择POST
  • 对于操作类型,选择Use action name
  • 要执行操作,请键入StartExecution
  • 对于执行角色,请输入具有API Gateway受信任身份提供者和附加策略AWSStepFunctionsFullAccess
  • 的角色ARN
  • For Integration Type, choose AWS Service
  • For AWS Service, choose Step Functions from the list
  • For HTTP Method, choose POST from the list
  • For Action Type, choose Use action name
  • For Action, type StartExecution
  • For Execution Role, type ARN of role with API Gateway trusted identity provider and attached policy AWSStepFunctionsFullAccess

这篇关于如何使用API​​网关调用AWS步骤功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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