是否可以从AWS Step函数调用API网关资源?

Hex*_*exy 4 amazon-web-services aws-api-gateway aws-step-functions

我有一个步骤函数,它应该调用 API 网关资源而不是 lambda。这样做的语法是什么?

{"Comment": "A Hello World example of the Amazon States Language using a Pass state",
  "StartAt": "QueueProducts",
  "States": {
    "GetProductsFromDb": {
      "Type": "Task",
      "Resource":"some-lambda",
      "Next": "InvokeAPIGatewayWorkers"
    }
  },
 "InvokeAPIGatewayWorkers":{
    "Type": "Parallel",
    "Branches": [
     ....]
}
}
Run Code Online (Sandbox Code Playgroud)

我的问题是,是否可以在资源中调用 API 网关而不是“some-lamda”

Bob*_*ney 7

不,这是不可能的。

您必须使用 Lambda 函数来调用 API Gateway。