Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services .StartExecution不是一个函数_Amazon Web Services_Lambda_Aws Step Functions - Fatal编程技术网

Amazon web services .StartExecution不是一个函数

Amazon web services .StartExecution不是一个函数,amazon-web-services,lambda,aws-step-functions,Amazon Web Services,Lambda,Aws Step Functions,我已经创建了一个lambda(到目前为止还不错) 规格: 有权使用STEP功能 流畅 版本:Node.js 14.x 但当我尝试从lambda调用step函数时,如下所示: var AWS = require("aws-sdk"); var stepfunctions = new AWS.StepFunctions({apiVersion: '2016-11-23'}); const params = { "input": "{}&quo

我已经创建了一个lambda(到目前为止还不错)

规格:

  • 有权使用STEP功能
  • 流畅
  • 版本:Node.js 14.x
但当我尝试从lambda调用step函数时,如下所示:

var AWS = require("aws-sdk");
var stepfunctions = new AWS.StepFunctions({apiVersion: '2016-11-23'});
const params = {
  "input": "{}",
  "name": srcKey,
  "stateMachineArn": process.env.STATE_MACHINE_ARN
};

return stepfunctions.StartExecution(params);
我得到以下错误:

响应
{
“errorType”:“TypeError”,
“errorMessage”:“stepfunctions.StartExecution不是函数”,
“跟踪”:[
“TypeError:stepfunctions.StartExecution不是函数”,
“at/var/task/index.js:119:26”,
“在包装器(/var/task/node_modules/async/dist/async.js:273:20)”中,
“在Response.next(/var/task/node_modules/async/dist/async.js:4585:24)”中,
”他回答道。
即使是这个:

该功能应该在那里可用

我错过了什么/做错了什么


谢谢!

您有一个打字错误……是小写的
s

startExecution
vs
startExecution


啊,我的错。到处都写着大写字母(a)。谢谢!
Response
{
  "errorType": "TypeError",
  "errorMessage": "stepfunctions.StartExecution is not a function",
  "trace": [
    "TypeError: stepfunctions.StartExecution is not a function",
    "    at /var/task/index.js:119:26",
    "    at wrapper (/var/task/node_modules/async/dist/async.js:273:20)",
    "    at Response.next (/var/task/node_modules/async/dist/async.js:4585:24)",
    "    at Response.<anonymous> (/var/task/node_modules/async/dist/async.js:326:20)",
    "    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:369:18)",
    "    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
    "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
    "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:688:14)",
    "    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)",
    "    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)"
  ]
}