Skip to content

step functions: Map.jsonata does not support assign #33403

@joerino96

Description

@joerino96

Describe the bug

Map.jsonata does not support the assign field provided by CDK, causing a compile error.

Regression Issue

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

Last Known Working CDK Version

No response

Expected Behavior

Map.jsonata is able to set the assign field.

Current Behavior

A compile error is thrown: Object literal may only specify known properties, and 'assign' does not exist in type 'MapJsonataProps'.

Reproduction Steps

The following code causes a compile error:

    const myMap = Map.jsonata(scope, "MyMap", {
        items: ProvideItems.jsonata("{% $runInput %}"),
        itemSelector: {
            runs: "{% $states.context.Map.Item.Value %}",
        },
        assign: {},
    })

However, the workaround for using the classic Map constructor and setting the query language to jsonata compiles correctly.

    const myMap = new Map(scope, "MyMap", {
        queryLanguage: QueryLanguage.JSONATA,
        items: ProvideItems.jsonata("{% $runInput %}"),
        itemSelector: {
            runs: "{% $states.context.Map.Item.Value %}",
        },
        assign: {},
    })

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.178.1

Framework Version

No response

Node.js Version

Node 18

OS

macOS 15.3

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-lambdaRelated to AWS LambdabugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions