We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS::StepFunctions::StateMachine
No response
Hi,
We are passing array of array in payload from step function to a lambda function, below is the sample code
array of array
lambdaFunction: serviceCallHandler, resultSelector: resultSelector, resultPath: resultPath, payload: TaskInput.fromObject({ key1: [ [ { key2: { key3: 'value1', }, key4: [ [ { key5: { key6: 'value2', }, }, ], ], }, ], ], }), }
but after building, the cloud formation template converts this into array of objects with 0 index at places which is incorrect.
0
like this
{ "Ref": "AWS::Partition" }, ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"", { "Fn::GetAtt": [ "servicecallhandler3F6E12B2", "Arn" ] }, "\",\"Payload\":{\"key1\":[{\"0\":{\"key2\":{\"key3\":\"value1\"},\"key4\":[{\"0\":{\"key5\":{\"key6\":\"value2\"}}}]}}]}}}
{ "Ref": "AWS::Partition" }, ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"", { "Fn::GetAtt": [ "servicecallhandler3F6E12B2", "Arn" ] }, "\",\"Payload\":{\"key1\":[[{\"key2\":{\"key3\":\"value1\"},\"key4\":[[{\"key5\":{\"key6\":\"value2\"}]}]}}]]}}
NA
The text was updated successfully, but these errors were encountered:
@srivastavr You might want to report this in the CDK repository, this doesn't look like a bug on the CloudFormation side.
See https://github.com/aws/aws-cdk#getting-help
Sorry, something went wrong.
Like @benbridts said, this doesn't look like a bug in CloudFormation, the serialization is implemented in CDK:
https://github.com/aws/aws-cdk/blob/a79794e3f2609e6efa5cf659eec039964a8ad61c/packages/aws-cdk-lib/aws-stepfunctions/lib/input.ts#L21-L23
It also doesn't look like the issue is in Step Functions' TaskInput class: https://www.mycompiler.io/view/ATeYKGae0NT
Opened a issue at CDK(aws/aws-cdk#26111)
Thanks
No branches or pull requests
Name of the resource
AWS::StepFunctions::StateMachine
Resource Name
No response
Issue Description
Hi,
We are passing
array of array
in payload from step function to a lambda function, below is the sample codebut after building, the cloud formation template converts this into array of objects with
0
index at places which is incorrect.like this
Expected Behavior
Observed Behavior
Test Cases
NA
Other Details
No response
The text was updated successfully, but these errors were encountered: