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 Antwort
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
EXPERTE
Alex_T
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen