SAP-C02 Question 285
Single answerAn e-commerce company is designing a serverless order processing system. When a customer places an order, the system should perform the following steps: 1) Validate the order details, 2) Process the payment, 3) Update the inventory, and 4) Send a confirmation email. Each step must be executed sequentially, and the system must handle retries for failed steps without executing the subsequent steps. Which AWS service should you recommend to orchestrate this workflow?
- A
Amazon Simple Notification Service (Amazon SNS)
- B
Amazon Simple Queue Service (Amazon SQS)
- C
AWS Step Functions
- D
Amazon EventBridge
Show answer and explanation
Correct answer: C
Explanation
AWS Step Functions is the most suitable service for orchestrating the sequential execution of tasks in this scenario. It allows you to define workflows with error handling and retry logic, ensuring that each step is completed successfully before proceeding to the next. Other services like SNS, SQS, and EventBridge are valuable for messaging and event-driven architectures but do not provide the required workflow orchestration capabilities.
- A. Incorrect.
Amazon SNS is a pub/sub messaging service and is not designed to orchestrate complex workflows or ensure sequential execution of tasks.
- B. Incorrect.
Amazon SQS is a message queuing service that decouples components but does not provide orchestration or sequential task execution.
- C. Correct.
AWS Step Functions is a serverless orchestration service that allows you to define workflows with sequential steps, error handling, and retry mechanisms, making it the ideal choice for this use case.
- D. Incorrect.
Amazon EventBridge is an event bus that routes events between AWS services and custom applications but does not provide workflow orchestration or sequential task execution.