`aws_stepfunctions`: Programmatic IO
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
One of the most frustrating areas when defining step functions is defining how values are passed between states (e.g. [`JsonPath`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.JsonPath.html)).
This could be greatly improved if states had properties to get their input and outputs.
### Use Case
```
const myPass = new sfn.Pass(this, 'MyPassState', {
parameters: {
'someValue.$': '$$.Execution.Input'
},
});
const mySfn = new sfn.StateMachine(this, 'MyStepFunction', {
definition: myPass,
timeout: cdk.Duration.hours(24)
});
```
### Proposed Solution
```
const mySfn = new sfn.StateMachine(this, 'MyStepFunction', {
timeout: cdk.Duration.hours(24)
});
const myPass = new sfn.Pass(this, 'MyPassState', {
parameters: {
'myValue': mySfn.input,
},
});
mySfn.definition = myPass;
```
### Other Information
Fixing this might be difficult, I just want to highlight this problem and see if others also experience it. Any programmatic solution would be a great improvement over using `JsonPath`s directly.
### Acknowledgements
- [ ] I may be able to implement this feature request
- [X] This feature might incur a breaking change
### CDK version used
2.132.1
### Environment details (OS name and version, etc.)
Linux 6.5.0-21-generic #21~22.04.1-Ubuntu x86_64 GNU/Linux
Contributor guide
Research direction
Start with the aws_stepfunctions Pass and StateMachine entry points and the JsonPath API referenced in the issue. Clarify the intended input and output semantics and the breaking-change boundaries before implementation. Done should let the shown use case express state data programmatically instead of embedding JsonPath strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100