Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.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 本地测试时AWS状态机错误:'';架构\验证\失败:值不是有效的资源ARN_Amazon Web Services_Aws Step Functions_Aws Sam Cli - Fatal编程技术网

Amazon web services 本地测试时AWS状态机错误:'';架构\验证\失败:值不是有效的资源ARN

Amazon web services 本地测试时AWS状态机错误:'';架构\验证\失败:值不是有效的资源ARN,amazon-web-services,aws-step-functions,aws-sam-cli,Amazon Web Services,Aws Step Functions,Aws Sam Cli,我试图使用SAM和AWS的step函数Docker对我的step机器进行本地测试,在加载我的步骤时遇到了错误 以下是我正在加载的内容: aws stepfunctions --endpoint http://localhost:8083 create-state-machine --definition "{\ \"Comment\": \"Fetch from DB and pass to Lambda\",\ \"StartAt\": \"GetWorkflowFromDb\

我试图使用SAM和AWS的step函数Docker对我的step机器进行本地测试,在加载我的步骤时遇到了错误

以下是我正在加载的内容:

aws stepfunctions --endpoint http://localhost:8083 create-state-machine --definition "{\
    \"Comment\": \"Fetch from DB and pass to Lambda\",\
    \"StartAt\": \"GetWorkflowFromDb\",\
    \"States\": {\
      \"GetWorkflowFromDb\": {\
        \"Type\": \"Task\",\
        \"Resource\": \"arn:aws:dynamodb:us-east-1:11111111111:table/webhookDb\",\
        \"Parameters\": {\
            \"TableName\": \"webhookDb\",\
            \"Key\": null,\
            \"webhookId\": {\
            \"S\": \"$input.params('webhookId')\"\
            }\
        },\
        \"ResultPath\": \"$.DynamoDB\",\
        \"Next\": \"HandleWorkflow\"\
      }, \
      \"HandleWorkflow\": {\
        \"Type\": \"Task\",\
        \"Resource\": \"arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:WebhookHandler\",\
        \"End\": true\
      }\
    }\
  }" --name "HelloWorld" --role-arn "arn:aws:iam::012345678901:role/DummyRole"
导致此错误的原因:

CreateStateMachine <= Invalid State Machine Definition: ''SCHEMA_VALIDATION_FAILED: Value is not a valid resource ARN at /States/GetWorkflowFromDb/Resource''

CreateStateMachine显然,状态机代码不接受实际的DB Arn。应该是这样的

arn:aws:states:::dynamodb:getItem
一些例子