Logo
Section 1 / 2

API 网关

了解如何通过 API Gateway 触发 AWS Step Functions

导入

API 网关

了解如何通过 API Gateway 触发 AWS Step Functions

No configuration found for ID: 19b85c541287dd3a2ea7daecfbf11a51a8360f63f6cbd0873e5e7fe8de4de7d7

1... 2productionLineStateMachine: 3 events: 4 - http: 5 path: trigger 6 method: POST 7 name: productionLineStateMachine
1 sweet-factory git:(main) ✗ sls deploy 2Running "serverless" from node_modules 3 4Deploying sweet-factory to stage dev (us-east-1) 5 6✔ Serverless StepFunctions OutPuts 7endpoints: 8 POST - https://xxxxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/trigger 9 10 11✔ Service deployed to stack sweet-factory-dev (122s) 12 13endpoint: POST - https://xxxxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/quality-check 14functions: 15 ingredientPreparation: sweet-factory-dev-ingredientPreparation (6.9 MB) 16 ...
1curl -X POST https://XXXXXXXXXXXX.execute-api.us-east-1.amazonaws.com/dev/trigger \ 2 -H "Content-Type: application/json" \ 3 -d "{\"body\": \"{\\\"requiredIngredients\\\":[{\\\"ingredient\\\":\\\"sugar\\\",\\\"quantity\\\":5},{\\\"ingredient\\\":\\\"flour\\\",\\\"quantity\\\":10}]}\"}"
Terminal

实战项目第六部分:打包

蓝绿部署