(step-functions): add keyPath in item reader
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the feature
Analogous to the new bucketNamePath parameter introduced in https://github.com/aws/aws-cdk/pull/31619 I expected to find a keyPath parameter when creating a item reader.
If the already existing "key" parameter is supposed to implicitly support JsonPath, then the naming and docstring of the parameter does not clearly express that.
### Use Case
I get an input event containing the dynamically generated key of the manifest file and want to reference it. The constructor of the class, in my case S3JsonItemReader, is vague about how to achieve this. In the AWS console for step functions I can just give it a JsonPath, the CDK constructor tells me to give it a concrete key.
### Proposed Solution
Either add a new parameter key_path analogous to bucket_name_path or update the docstring of parameter key to point out clearly that JsonPath is supported.
### Other Information
On a side-note, the docstring of bucket and bucket_name_path tells me the default is "S3 bucket will be determined from" - I do not quite understand what this is supposed to tell me
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.173.2
### Environment details (OS name and version, etc.)
macOS Sequoia 15.2
Contributor guide
Research direction
Start with the S3JsonItemReader constructor and compare its key handling with the bucketNamePath parameter introduced in pull request 31619. Determine whether the change should add keyPath or clarify existing JsonPath support; done means the chosen behavior is exposed consistently and the parameter documentation no longer suggests only concrete keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100