Question

Difficulty: MediumDecoupling Architectures and Event-Driven Messaging

A smart home security company is designing an event-driven system to process status logs from connected smart hubs (e.g., alarm armed, sensor triggered, door unlocked). To ensure the correct application logic, the status logs for each individual home must be processed in the precise order they are generated. The logs must be fanned out to both a real-time alerting service and a secondary database ingestion worker. The architecture must be decoupled, scalable, and minimize operational overhead.

Which combination of services and configurations should a solutions architect use to meet these requirements? (Select TWO.)

  1. Create an Amazon SNS FIFO topic to ingest the smart hub status logs and publish them to downstream subscribers.Answer
  2. Create Amazon SQS FIFO queues for the alerting service and the database ingestion worker, subscribing both queues to the SNS topic.Answer
  3. C
    Create standard Amazon SQS queues for both downstream services and subscribe them to a standard Amazon SNS topic.
  4. D
    Create a single standard Amazon SQS queue to buffer the logs, and configure both downstream services to poll the queue concurrently.

Answer

Create an Amazon SNS FIFO topic to ingest the smart hub status logs, and create Amazon SQS FIFO queues for the alerting service and database worker subscribed to the SNS FIFO topic.
To preserve ordering during event ingestion and distribution, Amazon SNS FIFO must be paired with Amazon SQS FIFO queues. An SNS FIFO topic ensures that message ordering is maintained when fanning out. SQS FIFO queues then receive these ordered messages and guarantee first-in, first-out processing for each downstream consumer independently.

Step-by-Step Solution

1
Select a message ordering mechanism that supports publishing and pub/sub routing.
Amazon SNS FIFO is chosen to ingest logs while preserving message sequencing.
We must fan out status updates to multiple downstream destinations while preserving the exact order per smart home.
2
Select a message buffering mechanism for the downstream processing services that maintains order.
Amazon SQS FIFO queues are selected for each downstream consumer.
Downstream workers require buffer queues to prevent data loss, and FIFO queues ensure that the message sequence is preserved through processing.
3
Subscribe the SQS FIFO queues to the SNS FIFO topic.
A fully decoupled pub/sub message delivery system that guarantees strict ordering and message deduplication.
By connecting SQS FIFO queues to the SNS FIFO topic, both consumers get a complete, ordered copy of each status log message independently.

Key Concept

Using Amazon SNS FIFO and Amazon SQS FIFO queues together enables decoupled, fan-out messaging architectures that guarantee strict first-in, first-out (FIFO) ordering and deduplication.
Rate this question