A company is building a document processing platform. Users upload PDF files to an Amazon S3 bucket. A containerized application analyzes each document and extracts metadata. The upload volume is highly irregular and unpredictable, with spikes of thousands of uploads per hour followed by hours of inactivity. Each document analysis takes approximately 20 minutes to complete, and the order of processing does not matter. The extracted metadata must be stored in a database that scales automatically to handle sudden spikes. Which combination of services and capacity modes will provide the most cost-effective architecture? (Select TWO.)
- Run the containerized application on AWS Fargate using Spot Providers, triggered by messages in an Amazon SQS standard queue.Answer
- BUse AWS Lambda functions triggered by S3 bucket events to run the document analysis code.
- Store the metadata in an Amazon DynamoDB table configured with on-demand capacity mode.Answer
- DStore the metadata in an Amazon DynamoDB table configured with provisioned capacity mode and target tracking auto-scaling.
- ERun the containerized application on AWS Fargate using On-Demand Providers, triggered by messages in an Amazon SQS FIFO queue to ensure message ordering.
Answer
Run the containerized application on AWS Fargate using Spot Providers with an Amazon SQS standard queue, and store the metadata in an Amazon DynamoDB table configured with on-demand capacity mode.
Running the containerized application on AWS Fargate using Spot Providers with a standard SQS queue is cost-effective because the 20-minute execution duration exceeds the 15-minute limit of AWS Lambda. Fargate Spot offers up to a 70% discount compared to On-Demand pricing. Additionally, configuring the DynamoDB table to use on-demand capacity mode is ideal for unpredictable and spiky workloads because it charges only for actual read and write requests and scales to zero when there is no traffic, avoiding provisioned capacity costs during idle periods.
Step-by-Step Solution
Key Concept
Selecting the most cost-effective serverless compute and database configurations for unpredictable, long-running batch workloads.