Skip to content

stepfunctions: resultwriter on jsonata distributed maps fails deployments #33396

@nywhere

Description

@nywhere

Describe the bug

The following is working with DistributedMaps and JsonPath language:

map = sfn.DistributedMap(
    result_writer=sfn.ResultWriter(
        bucket=s3_bucket, 
        prefix=prefix
    )
)

With JSONata synth is ok, but the deployment fails with:

Resource handler returned message: "Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: These fields are required: [Arguments] at /States/Stages/ItemProcessor/States/Stage/ResultWriter'

Meanwhile step function UI designer does add "Arguments":

"ResultWriter": {
    "Resource": "arn:aws:states:::s3:putObject",
    "Arguments": {
        "Bucket": "mybucket",
        "Prefix": "tmp/logs"
    }
}

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

ResultWriter should still work with JSONata language

Current Behavior

ResultWriter only works with JsonPath language.

Reproduction Steps

  • Create state machine
  • Add a distributed map with JSONata language
  • Add a ResultWriter
  • Deploy

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.178.1 (build ae342cb)

Framework Version

No response

Node.js Version

v18.16.0

OS

OSX 15.3

Language

Python

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions