Bird
0
0

You need to design a Step Functions workflow that processes a list of orders, but only for orders with amount greater than 100. Which combination of states is best to filter and process these orders?

hard📝 Application Q9 of 15
AWS - Serverless Architecture
You need to design a Step Functions workflow that processes a list of orders, but only for orders with amount greater than 100. Which combination of states is best to filter and process these orders?
AUse a Pass state to filter orders, then a Task state to process all orders
BUse a Choice state before the Map state to filter orders, then Map processes all filtered orders
CUse a Map state with a Choice state inside the iterator to process only orders with amount > 100
DUse a Wait state to delay processing, then a Map state to process all orders
Step-by-Step Solution
Solution:
  1. Step 1: Identify best pattern for conditional list processing

    To process only qualifying items in a list, use Map to iterate over the list, with Choice inside the iterator to conditionally process or skip each order.
  2. Step 2: Evaluate options

    Map with Choice inside the iterator processes only orders >100, skipping others via conditional logic. Choice before Map cannot transform or filter array inputs effectively as it controls workflow branching, not data. Pass and Wait states do not filter or process conditionally.
  3. Final Answer:

    Use a Map state with a Choice state inside the iterator to process only orders with amount > 100 -> Option C
  4. Quick Check:

    Map + Choice inside = conditional list processing [OK]
Quick Trick: Map + Choice in iterator for filtering/conditional process [OK]
Common Mistakes:
  • Using Choice before Map to filter lists
  • Using Pass or Wait states for filtering

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes