A healthcare provider is designing a medical imaging pipeline. When a clinic uploads a raw MRI scan ( to ) to an Amazon S3 bucket, the scan must be processed by a cluster of CPU-intensive workers. The processing tasks must be handled asynchronously. Due to compliance requirements, the scans must be processed in the exact order they are received by the system to ensure correct chronological correlation, and no scan should be processed more than once. The upload volume can peak unexpectedly, and processing can take up to minutes per scan.
Which solution meets these requirements with the least operational overhead?
- AConfigure an Amazon S3 event notification to publish ObjectCreated events directly to an Amazon SQS FIFO queue. Configure the workers to consume messages from the FIFO queue.
- BConfigure an Amazon S3 event notification to publish ObjectCreated events directly to an Amazon SQS standard queue. Configure the workers to consume messages from the standard queue.
- Enable Amazon EventBridge notifications on the Amazon S3 bucket. Create an EventBridge rule that routes S3 ObjectCreated events to an Amazon SQS FIFO queue, and configure the workers to consume messages from the FIFO queue.Cevap
- DConfigure an Amazon S3 event notification to trigger an AWS Lambda function that downloads the scan, performs the CPU-intensive processing directly within the function, and saves the result to another S3 bucket.
Cevap
Enable Amazon EventBridge notifications on the Amazon S3 bucket. Create an EventBridge rule that routes S3 ObjectCreated events to an Amazon SQS FIFO queue, and configure the workers to consume messages from the FIFO queue.
The correct solution uses Amazon S3 EventBridge integration. Because Amazon S3 cannot publish events directly to an Amazon SQS FIFO queue, enabling EventBridge notifications on the bucket allows S3 to emit events to the default event bus. An EventBridge rule can then match these events and route them to an SQS FIFO queue. The SQS FIFO queue guarantees that the messages are processed in the order they were uploaded (first-in, first-out) and prevents duplicate processing (exactly-once processing) through deduplication. This architecture is asynchronous and serverless, minimizing operational overhead.
Adım Adım Çözüm
Anahtar Kavram
Using Amazon EventBridge to bridge S3 event notifications with Amazon SQS FIFO queues for strict ordering and deduplication.