-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws_stepfunctions): Depreciated Parameters field in Map #23265
Comments
To be clear, you're referring to this parameter which will end up rendering like this?
|
Hi @peterwoodworth, |
My customer is trying to use I have suggested them to use the deprecated The documentation here states that it's highly recommended to use ItemSelector instead of Parameters, but CDK users will not be able to follow this recommendation due to missing support for ItemSelector in the CDK construct.
|
Been a bit disappointed with the supported of |
Hi, @grzegorzewald probably not canonical (but a workaround) but I had a similar issue and while we wait the native cdk class Map support for it, we can use a CustomState based off the MapState and tweak a couple props: const mapState = new sfn.CustomState(this, 'MapWithSelector', {
stateJson: {
...new sfn.Map(this, 'Irrelevant', {
itemsPath: sfn.JsonPath.stringAt('$.parallelInputData'),
})
.iterator(yourIteratorGoesHere)
.toStateJson(),
End: undefined,
ItemSelector: {
'ContextIndex.$': '$$.Map.Item.Index',
'ContextValue.$': '$$.Map.Item.Value',
},
},
}); This will create the Map state with the ItemSelector on it. |
IMO, this request shouldn't be labeled as "feature request". It's actually an inconsistency with the official doc, thus "bug" looks a better classification for me (even for prioritization purposes) |
would also love to use the ItemSelector instead of Parameters :) |
From the Step Functions Documentation for Map (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html) under the
The current The only way around it is to use the |
Adds support for Map's [ItemSelector](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-itemselector.html) field and deprecates [parameters](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-deprecated-fields). With the release of Distributed Maps, AWS StepFunctions has released a few new fields, and deprecated two old ones for Map states. One of them was `Iterator` which was replaced with `ItemProcessor`, the other one is `Parameters` (replaced by `ItemSelector`). A similar PR was made to deprecate `Iterator` (#27913). While they are deprecated, these fields are still supported (PR reflects that) `ItemProcessor` and `ItemSelector` are both fields that are supported in `DISTRIBUTED` and `INLINE` mode, hence why they were added to the existing Map construct Closes #23265 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the feature
As per https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#map-state-inline-deprecated-fields,
Parameters
filed is now depreciated.ItemSelector
field should be used instead (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-asl-use-map-state-inline.html#itemselector)Use Case
Depreciated fields may break compatibility
Proposed Solution
As new
ItemSelector
filed takes input in exactly the same form as depreciated 'Parameters', the easiest solution would be to rename field and create "alias" with depreciation warning durning synth.Other Information
No response
Acknowledgements
CDK version used
2.53.0
Environment details (OS name and version, etc.)
MacOS 13.0.1
The text was updated successfully, but these errors were encountered: