1 December 2026 · 3 min read · Download as PDF
Events into Step Functions: rule, pipe or API?
EventBridge rules, Pipes and direct API calls can each start a Step Functions workflow. Choose by where the event waits and what you need to know when the start succeeds.
Part 5 of 6 · From Event to Outcome: AWS Messaging Patterns
The OrderPlaced event has reached fulfilment. Payment and stock checks must both pass before shipping. A Step Functions workflow can make that order visible. The design question is how to start it: from the event bus, from a queue through EventBridge Pipes, or directly from the service that accepted the order.
Part 5 of 6 in From Event to Outcome, a series on AWS messaging patterns.
Where this fits. The queue in Part 4 gave the consumer a place to handle retries. In the buffered route, the Pipe consumes the message and starts a Step Functions execution, which owns the sequence of payment, stock and shipping. The diagram compares two event-driven entry paths. The article also covers a direct application API call. Part 6 picks up once the execution is running and asks which results must agree before shipping.


The two routes shown are alternatives. The status event at the right applies to Standard workflows. AWS delivers these events on a best-effort basis, so use the execution record or order state to reconcile a missing result.
TL;DR
- An EventBridge rule can match an event and start a state machine. The bus remains the routing boundary.
- An EventBridge Pipe can poll Simple Queue Service (SQS), optionally filter or enrich records, then target Step Functions. The queue is the backlog boundary.
- A service can call the Step Functions API directly when it owns the command to start a named process.
- A successful asynchronous start means execution accepted, not business process complete.
Three entry routes
Event bus to rule to workflow. This is clean when every matching event should start a workflow and no separate queue is needed before the start. Give the rule permission to start the workflow and configure a target dead-letter queue for delivery failures. Filter on the intended source, event type and version. If replay should never start fulfilment, exclude events with the replay-name field. Keep the workflow’s business idempotency check for other duplicates.
SQS to Pipe to workflow. This works when fulfilment needs a backlog, independent drain rate or an existing queue. Pipes can filter and enrich between source and target without a Lambda bridge. AWS’s own Pipes guide uses an order queue enriched with customer details before a Step Functions target. A Standard workflow must be invoked asynchronously. The pipe can know the start call succeeded, but a business failure inside that Standard execution happens later; monitor workflow status separately. Pipes removes SQS messages that fail its filter. Use a dedicated queue and test the filter against real message bodies. With batching enabled, the target receives an array, so keep the batch size at one for this single-order workflow or design the workflow to process multiple orders.
Orders service to StartExecution. This is a command from an application that explicitly owns the fulfilment process. It can choose an execution name and input and handle the API response. For Standard workflows, retrying StartExecution with the same name and input returns the existing response while that execution is running. Express lacks that API guarantee, so protect the order operation with its own idempotency key. The dual-write problem still applies if it must commit an order first and start the workflow second; use an outbox or another deliberate recovery design.
Pick one entry route for the same event. Running the rule and pipe paths together can start two workflows for one order. Keep an idempotency strategy at the workflow boundary even if you intend only one route, because producers and delivery systems can retry.
Inside the workflow
Use Parallel for a fixed set of independent checks, such as payment and stock. On successful completion of both branches, inspect their results before moving to shipping. A task can complete successfully and still return a business decline. Route declines to the appropriate cancellation or compensation step. Use Map when the same step runs over a collection, such as order lines. Configure retries, catches and timeouts around the actual tasks. A callback with task token can wait for an external approval or worker, but that is a different contract from merely publishing an event.
Next: how to join results across branches, recover a failed path and replay events without repeating side effects.
From Event to Outcome
- SQS, SNS and EventBridge: choose by the job (Amazon Simple Queue Service, Simple Notification Service and EventBridge)
- Publishing an event without losing the order
- Fan-out without coupling every consumer
- The consumer is where reliability becomes real
- Events into Step Functions: rule, pipe or API? (you’re here)
- Fan-in, recovery and the end of the event story