SAA-C03 Question 159
Single answerA company is building a serverless application to process customer orders. The workflow involves multiple steps, including validating the order, charging the customer, sending a confirmation email, and updating the inventory. These steps must be executed in sequence, and any failure in one step should trigger a rollback of the entire process. Which AWS service is the MOST suitable choice for orchestrating this workflow?
- A
AWS Step Functions
- B
AWS Lambda
- C
Amazon SQS
- D
Amazon SWF
Show answer and explanation
Correct answer: A
Explanation
AWS Step Functions is designed specifically for workflow orchestration, allowing you to define and execute workflows with built-in error handling, retries, and rollback. It is the best choice for this scenario where sequential execution and failure handling are required. Other options like AWS Lambda, Amazon SQS, and Amazon SWF either lack orchestration capabilities or are less suited to modern serverless architectures.
- A. Correct.
AWS Step Functions is the most suitable service for orchestrating workflows that involve sequential steps, error handling, and rollback logic. It allows you to define workflows as state machines and handles coordination between steps.
- B. Incorrect.
AWS Lambda is a compute service for running code in response to events. While it can execute individual tasks in the workflow, it doesn’t provide built-in orchestration or rollback capabilities.
- C. Incorrect.
Amazon SQS is a messaging service that can be used for decoupling components in distributed systems, but it does not provide workflow orchestration or sequential execution capabilities.
- D. Incorrect.
Amazon SWF (Simple Workflow Service) is also a workflow orchestration service, but it is older and less frequently used compared to AWS Step Functions. Step Functions offers better integration with modern AWS services and is the preferred option for serverless architectures.