- 最新
- 最多得票
- 最多評論
Firstly, to start a step function execution from API Gateway (i.e. invoke step function from API gateway), I recommend you to refer the following document [1]. And to have Lambda function invocation in Step function, refer this document [2]
As mentioned in [3] StartExecution API need three parameters, 1. input json to Step Function 2. Name of execution 3. Step function ARN. In the example [1] the input is passed as {} i.e. an empty json, so the step function will be executed with empty json.
To invoke Step function with path parameters, you need to pass/modify the Mapping template json in the Integration request as per your requirement. The main field to be modified is ‘input’.
Refer 'Note' section in step 3 of [1] and the document [4].
[1] Creating a Step Functions API using API Gateway - https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-api-gateway.html [2] Creating a Step Functions state machine that uses Lambda - https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-creating-lambda-state-machine.html [3] StartExecution - Request Syntax - https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html#API_StartExecution_RequestSyntax [4] Understanding mapping templates - https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html
相關內容
- AWS 官方已更新 3 年前
- AWS 官方已更新 3 年前
- AWS 官方已更新 3 年前