aws / aws/aws-cdk

Allow `Name` parameter of StateMachine to support input parameters

Open
#15,773 3 comments 2 reactions 0 assignees View on GitHub
@aws-cdk/aws-stepfunctions effort/small feature-request feature/coverage-gap p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
71

Description

At present, the string parser for generating a state machine configuration does not allow for using Stepfunctions input parameters. The idea is to be able to generate a `Name` property like below.

```json
"Name.$": "States.Format('{}_{}_{}', $.executionId, $.usecase, 'NonOverlapping')"
```

At the moment, the name property always generates as `Name:` rather than `Name.$:`, preventing using input parameters.

### Use Case

This will allow for more dynamic and reusable state machines to be generated using the CDK and unlock a missing part of Stepfunctions functionality.

### Proposed Solution

This could either be as simple as an additional boolean prop on the `StateMachine` resource, or the string parser could check for `$.XXXX` in the name prop and automatically append the relevant `.$`

### Other

* [ ] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change

_Created from PS request D24467213_

---

This is a :rocket: Feature Request

Contributor guide

Open the contributing guide

Research direction

Start with the string parser for generating state machine configuration and trace how the StateMachine Name property is serialized. Define and test the behavior for dynamic input parameters so the output uses Name.$, while preserving the existing Name form for static values.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.