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 Answer
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
EXPERT
Alex_T
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions