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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ