Question

Difficulty: MediumDecoupling Architectures and Event-Driven Messaging

A medical laboratory runs an automated pipeline to analyze clinical trial results. When a new trial dataset is uploaded to an Amazon S3 bucket, it must trigger two separate processes: a statistical analysis engine and a regulatory compliance auditing service. The systems must process these datasets asynchronously. If either downstream service encounters an error or fails to process a dataset, the dataset event must be isolated for analysis without disrupting the rest of the queue. The order in which datasets are processed is not critical, but each service must process a copy of every dataset event.

Which combination of steps should a solutions architect recommend to design a decoupled and resilient architecture for this application? (Select TWO.)

  1. Configure the Amazon S3 bucket to send event notifications to an Amazon SNS topic, and subscribe two Amazon SQS standard queues to the topic, with each queue dedicated to one of the processing services.Answer
  2. Configure an Amazon SQS dead-letter queue (DLQ) for each of the processing queues to capture and isolate messages that cannot be processed successfully.Answer
  3. C
    Configure a single Amazon SQS standard queue to receive the event notifications, and configure both downstream services to poll this queue, relying on standard SQS to process messages in strict chronological order.
  4. D
    Deploy an Amazon RDS DB instance with Multi-AZ enabled to act as the messaging queue, and configure the downstream services to perform automatic failover to the read replica if message retrieval fails.
  5. E
    Configure the downstream services to access the S3 bucket using an AWS Site-to-Site VPN tunnel with ECMP enabled, ensuring that message retrieval traffic does not exceed the tunnel capacity of 1.25 Gbps.

Answer

To build a decoupled and resilient architecture, configure Amazon S3 to publish event notifications to an Amazon SNS topic. Subscribe two separate Amazon SQS standard queues to the SNS topic, allowing each downstream service to consume a dedicated copy of the events. To handle failures gracefully, configure a dead-letter queue (DLQ) for each SQS queue to capture and isolate messages that fail to process.
To decouple the services while ensuring both the statistical analysis engine and the regulatory compliance auditing service receive a copy of every event, a fan-out pattern is required. Configuring the Amazon S3 bucket to publish to an Amazon SNS topic, and then subscribing a dedicated SQS queue for each service, satisfies this requirement. Since ordering is not critical, standard SQS queues are appropriate. To ensure resilience, attaching a Dead-Letter Queue (DLQ) to each processing SQS queue isolates messages that fail to process, preventing blocking errors in the main pipeline.

Step-by-Step Solution

1
Select a message distribution pattern that allows a single S3 event to be copied and delivered to multiple independent processing systems (fan-out pattern).
Amazon SNS is identified as the publisher, and Amazon SQS queues are identified as subscribers.
Amazon SNS supports fan-out messaging to multiple SQS queues, preventing competing consumers issues.
2
Ensure that processing failures do not block the entire message processing pipeline.
Each SQS queue is configured with a dead-letter queue (DLQ).
Failed events are diverted to the DLQ after a specific number of retries, leaving the main queue clear for subsequent datasets.

Key Concept

Decoupling multi-consumer systems using Amazon SNS and SQS fan-out with Dead-Letter Queues (DLQs) for resilient asynchronous processing.
Rate this question