I think payload expects object but I cant find any help and how to pass JSON to Lambda in AWS StepFunction
create_group = tasks.LambdaInvoke(
self,
"CreateGroup",
lambda_function=notification_lambda,
payload={
"Input.$": "$",
"Stage": "CreateGroup",
"token.$": "$$.Task.Token",
"callback": "true"
},
result_path='$',
timeout=Duration.seconds(300)
)
This is the error I am getting when I synth
jsii.errors.JavaScriptError:
Error: Expected object reference, got {"$jsii.map":{"Input.$":"$","Stage":"CreateGroup","token.$":"$$.Task.Token","callback":"true"}}