A law firm is designing a serverless system to automate the metadata extraction of scanned case files. Case documents are uploaded to Amazon S3 at unpredictable times throughout the day, followed by long periods of inactivity. The processing pipeline must process the documents in the exact chronological order of their upload to maintain case sequence integrity. The extraction logic is packaged as a containerized application and takes between and minutes per document batch. The extracted metadata is stored in a database that is queried sporadically by internal applications. Which system architecture meets these requirements in the most cost-effective manner?
- Configure Amazon S3 event notifications to publish messages to an Amazon SQS FIFO queue. Deploy the containerized application on Amazon ECS using the AWS Fargate launch type, scaling the number of tasks dynamically based on queue depth. Store the metadata in an Amazon DynamoDB table configured with On-Demand capacity mode.Answer
- BConfigure Amazon S3 event notifications to trigger an AWS Lambda function that runs the containerized application. Store the metadata in an Amazon DynamoDB table configured with On-Demand capacity mode.
- CConfigure Amazon S3 event notifications to publish messages to an Amazon SQS Standard queue. Deploy the containerized application on Amazon ECS using the AWS Fargate launch type, scaling the number of tasks dynamically based on queue depth. Store the metadata in an Amazon DynamoDB table configured with On-Demand capacity mode.
- DConfigure Amazon S3 event notifications to publish messages to an Amazon SQS FIFO queue. Deploy the containerized application on Amazon ECS using the AWS Fargate launch type, scaling the number of tasks dynamically based on queue depth. Store the metadata in an Amazon DynamoDB table configured with Provisioned capacity mode with Auto Scaling.
Answer
Configure Amazon S3 event notifications to publish messages to an Amazon SQS FIFO queue, deploy the containerized application on Amazon ECS using the AWS Fargate launch type scaling dynamically based on queue depth, and store the metadata in an Amazon DynamoDB table configured with On-Demand capacity mode.
The correct solution uses an Amazon SQS FIFO queue to guarantee the chronological sequence of case document updates. It runs the containerized logic on Amazon ECS with the AWS Fargate launch type, which supports runtimes exceeding minutes and scales dynamically down to zero when the queue is empty to avoid idle compute charges. Finally, it uses Amazon DynamoDB with On-Demand capacity mode to store the metadata, avoiding any minimum hourly costs during long periods of database inactivity.
Step-by-Step Solution
Key Concept
Serverless queue-based container orchestration and database capacity optimization for unpredictable, long-running batch workloads.