An order workflow reserves inventory, charges payment, and arranges shipping through separate microservices. Failed steps require retries, and a shipping failure must trigger a refund and inventory release without adding coordination logic to the microservices. Which design BEST meets these requirements?
Show the answer
Correct answerD. Use AWS Step Functions to coordinate steps and invoke compensating actions.
AWhy not this: A shared queue distributes work but does not manage dependencies or compensate for completed steps.
BWhy not this: EventBridge rules route events but do not by themselves coordinate stateful rollback across services.
CWhy not this: SNS fanout delivers notifications but does not coordinate ordered steps, retries, and compensating actions.
DWhy this is right: Step Functions maintains workflow state and supports retries and error paths that invoke compensating actions.
AWS Step Functions can coordinate service calls, retries, and compensating actions for a distributed workflow. EventBridge routing alone does not maintain workflow state or coordinate refunds and inventory release after a later failure.