简体   繁体   中英

What is the proper Resource value in AWS Step Function SendTaskSuccess task

I am creating an async task using AWS Step Functions. I created a Step Function calling another Step Function with.waitForTaskToken and stored Task Token in DB. Now I'm creating another Step Function that processes a message from API Gateway and calls SendTaskSuccess. Here is the exact state, the Workflow Studio generated for me:

    "SendTaskSuccess": {
      "Type": "Task",
      "End": true,
      "Parameters": {
        "output": "{}",
        "taskToken.$": "$.taskToken"
      },
      "Resource": "arn:aws:states:::aws-sdk:states:sendTaskSuccess"
    },

My problem is that when I'm saving the Step Function, it tells me this:

There are Amazon States Language errors in your state machine definition. Fix the errors to continue.
The resource provided arn:aws:states:::aws-sdk:states:sendTaskSuccess is not recognized. The value is not a valid resource ARN, or the resource is not available in this region.
For more information, see Amazon States Language 

So my question is - what would be the proper Resource value for this task? In the Workflow Studio, there is no way to specify any resource to use, it generates the ARN above automatically

I ran into a similar issue and it appears arn:aws:states:::aws-sdk:sfn:sendTaskSuccess ( sfn instead of states ) is the correct arn. Furthermore, the parameters should start with an uppercase letter:

"Parameters": {
  "TaskToken.$": "$.taskToken",
  "Output.$": "$.outputs"
}

I also checked the Workflow Studio, which produced the above arn in my case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM