Question 1
Topic: Development with AWS Services
Skill tested: Select asynchronous AWS service patterns to decouple components and absorb workload spikes.
An online retailer's checkout API currently calls an inventory service and then a slow shipment-planning service synchronously. Shipment planning can take several minutes during seasonal peaks, causing API timeouts and tying up application capacity. The retailer needs to accept orders quickly, preserve each accepted request for later processing, and retry transient shipment-planning failures without requiring the checkout service to remain available. The processing order among different orders is not important, and the team wants to minimize custom orchestration code. Which design best meets these requirements?
An SQS queue persists accepted orders independently of the checkout service and lets consumers process work asynchronously as capacity permits. Lambda event source mapping retries failed messages according to its behavior, while visibility timeout settings help prevent concurrent processing of the same message during normal execution. A synchronous invocation or API timeout adjustment still couples checkout latency and availability to shipment planning. DynamoDB polling adds custom coordination and repeated reads. EventBridge supports event routing, but direct Lambda invocation does not provide the same durable work-queue semantics for this workload.