AWS Solutions Architect · Design Resilient Architectures · medium

An e-commerce checkout service publishes order events that must be processed once and strictly in the order each customer submitted them, while also fanning the same events out to a fraud-scoring queue and an inventory queue. Which architecture meets these requirements?

Published · Last updated · checked before publication — how we verify questions

Options

  • APublish events to an Amazon SNS standard topic and subscribe two Amazon SQS FIFO queues with message groups
  • BPublish events to an Amazon SNS FIFO topic and subscribe two Amazon SQS FIFO queues for fraud and inventoryCorrect answer
  • CSend checkout events directly to a single Amazon SQS FIFO queue and have both worker fleets poll that queue
  • DStream checkout events into Amazon Data Firehose and trigger synchronous AWS Lambda invocations for each consumer

Answer: B. Publish events to an Amazon SNS FIFO topic and subscribe two Amazon SQS FIFO queues for fraud and inventory

Publishing to an Amazon SNS FIFO topic with content-based deduplication and subscribing two Amazon SQS FIFO queues preserves message ordering per message group ID and fans events out to both downstream consumers. Standard topics/queues do not guarantee strict ordering, and Kinesis Data Firehose buffers streams to storage destinations rather than providing ordered per-order transactional queues.

Why the other options are wrong

  • A. Publish events to an Amazon SNS standard topic and subscribe two Amazon SQS FIFO queues with message groups — An Amazon SNS standard topic cannot subscribe SQS FIFO queues to guarantee strict end-to-end ordering.
  • C. Send checkout events directly to a single Amazon SQS FIFO queue and have both worker fleets poll that queue — Having two different services poll the same SQS queue causes messages to be consumed by only one service rather than fanned out to both.
  • D. Stream checkout events into Amazon Data Firehose and trigger synchronous AWS Lambda invocations for each consumer — Amazon Data Firehose is designed for buffered delivery to storage and analytics sinks, not strict per-order fan-out queuing.

All Design Resilient Architectures questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.