Skip to content

StateMachine - support for definition string or JSON #8146

@erik-sab

Description

@erik-sab

When creating Step Functions StateMachine there is no possibility to provide already created definition string.

Also there is no way of creating IChainable from definition string of JSON which would also solve the issue.

That would be extremely useful for our use-case, when it is more convenient to define initial flow steps in JSON file and then edit them programmatically.

When using low-level CfnStateMachine there is no way of getting state machine ARN, so workaround is to construct it by hands, also we loose some helpers there.

Use Case

  1. We have JSON file template for creating EMR execution step functions taking care of: cluster creation, initialisation, error handling, and shutdown logic.
  2. Template is parsed and actual work steps are being added programmatically based on external configuration.
  3. Also some project parts define whole flow in JSON file, and use CDK to create supporting resources only.

Having possibility to convert IChainable to and from JSON would also help a lot for early state machine testing and debugging.

Proposed Solution

a) Add JSON input support to Chain similar to one we have in CustomState which does accept JSON as input, but works only for single state.

b) Add support for definitionString in StateMachine similar to one we have in CfnStateMachine

c) Add support for definitionJson in StateMachine similar to one we have in CustomState

Other


This is a 🚀 Feature Request

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions