AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A retail company is re-architecting its monolithic e-commerce platform into a distributed microservices architecture on AWS. A critical business process is order fulfillment, which involves a sequence of steps: validating the order, processing payment, updating inventory, and arranging shipping with a third-party logistics (3PL) provider via an external API.
The new design requires the following:
The Order Service must initiate the workflow.
Several other microservices, such as Analytics and Customer Notifications, need to be independently notified when a new order is successfully processed.
The interaction with the 3PL provider's API must be resilient, with built-in support for retries and error handling.
The entire fulfillment process must be traceable from start to finish, with clear visibility into the state of each order's workflow.
The architecture must allow for easy integration of future services that might also need to react to order events.
A solutions architect needs to select the most appropriate combination of AWS services to orchestrate this workflow and handle event distribution. Which combination of services best meets all these requirements?
Use a single AWS Lambda function to orchestrate the entire process and call the different microservices and APIs directly. Use an Amazon SNS topic for fan-out.
Use AWS Step Functions to orchestrate the sequential order fulfillment process. Use Amazon EventBridge to publish a final event, allowing various independent services to subscribe and react to completed orders.
Use a single Amazon SNS topic to trigger multiple Amazon SQS queues, one for each microservice in the order process, to process the steps in parallel.
Use Amazon SQS queues between each microservice to handle the sequence and an Amazon SNS topic to fan out notifications.
The correct answer is the combination of AWS Step Functions and Amazon EventBridge. AWS Step Functions is the ideal service for orchestrating multi-step, stateful workflows. It natively provides the required sequencing, error handling, retries, and traceability for the core order fulfillment process. For distributing the "order processed" event to multiple, decoupled microservices, Amazon EventBridge is the superior choice. It acts as a serverless event bus that allows current and future services to subscribe to events based on rules without requiring any changes to the event producer. This combination directly addresses all the requirements in the most scalable and maintainable way.
Using Amazon SQS queues between each microservice (choreography) fails to provide a centralized, traceable orchestration layer. The logic for retries, error handling, and state management would need to be custom-built into each service, increasing complexity. AWS Step Functions is purpose-built for this type of orchestration.
Using a single AWS Lambda function as an orchestrator is an anti-pattern for complex, long-running workflows. It is subject to execution time limits and lacks the built-in resilience, state management, and observability features that AWS Step Functions provides.
Using Amazon SNS and SQS for the entire process is incorrect because it describes a parallel fan-out pattern, whereas the core fulfillment process is sequential. It also lacks the required orchestration capabilities for managing a stateful workflow.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is AWS Step Functions and how does it help in workflows?
Open an interactive chat with Bash
What is Amazon EventBridge and why is it important for event-driven architectures?
Open an interactive chat with Bash
Why is AWS Step Functions better than using Lambda for workflow orchestration?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Accelerate Workload Migration and Modernization
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access