Issue
I have a Parallel
state with four branches. Each branch is represented by a Map
state.
I chunk my array into sub-arrays of 250 items in a lambda, return it, and pass it to itemsPath
via Step Function context like:
itemsPath: '$.props0'
There is every chance sometimes one to three of my 4 sub-arrays will be empty, this is causing a number of branches in my SF to fail with below error:
Unable to apply step \"props1\" to input
Is there any way to make itemsPath
optional? Or only run a Map
state if itemsPath
is not empty?
Solution
I accounted for this in my lambda, then leveraged a Condition
inside a Choice
, and called the appropriate State
- either a single Map
, or my four nested Map
s in my Parallel
.
Answered By - notAChance
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.