Skip to content

StepFunctions -> TaskInput cannot select the entire Input  #6388

@mrgrain

Description

@mrgrain

Using TaskInput in step functions, it is impossible to select the entire step input.

I would expect to be able to select the entire input using $, however the JSON path validator expects a path to start with $.

Reproduction Steps

In a newly created project, put this as stack:

export class StepfunctionbugStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const topic = new Topic(this, "topic");

    const definition = new Task(this, "task", {
      task: new PublishToTopic(topic, {
        message: TaskInput.fromDataAt("$")
      })
    });

    new StateMachine(this, "state-machine", {
      stateMachineType: StateMachineType.STANDARD,
      definition
    });
  }
}

Error Log


Data JSON path values must start with '$.'
Subprocess exited with error 1

Environment

  • CLI Version : 1.25.0 (build 5ced526)
  • Framework Version: 1.25.0
  • OS : macOS Mojave 10.14.5
  • Language : Typescript 3.7.5

This is 🐛 Bug Report

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions