Parameter invalid error in Step Function while creating AWS Forecast Resources

0

I am creating AWS Forecast Resources via Step Function and lambda, for which I first used CreateDataset module in Step Function and then CreateDatasetGroup The output of CreateDataset which is arn is passed to CreateDatasetGroup Input in this way-

{"DatasetArns.$": "$.CreateDatasetOutput.DatasetArn"}

but I am getting error-
could not be used to start the Task: [Cannot construct instance of java.util.ArrayList (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value

in the error I can see that the Arn is correctly read- "DatasetArns":"arn:aws:forecast:ap--:********:dataset/******" but it is not running successfully

I am unable to pass the DatasetArn correctly to step function CreateDatasetGroup module. Kindly help

1 回答
0

It looks like the error you're seeing here is because you're trying to pass a single string to the DatasetArns field which (per the CreateDatasetGroup API) expects an array.

I believe you should be able to use the States.Array() intrinsic function to wrap your single dataset ARN into an array - something like:

{"DatasetArns.$": "States.Array($.CreateDatasetOutput.DatasetArn)"}
AWS
专家
Alex_T
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则