A company is designing a serverless architecture to process data files uploaded to Amazon S3. The processing of each file is CPU-intensive and takes between 20 to 25 minutes to complete. The metadata and processing results must be saved to a database. The file uploads occur in highly unpredictable bursts throughout the day, with long periods of complete inactivity. The company wants to minimize costs and avoid paying for idle compute resources. Which two options should the solutions architect recommend to meet these requirements in a cost-optimized manner? (Select two.)
- Run the processing application as containerized tasks using Amazon Elastic Container Service (Amazon ECS) on AWS Fargate.Answer
- Use Amazon DynamoDB with On-Demand capacity mode to store the metadata and results.Answer
- CUse AWS Lambda functions to execute the file processing logic directly.
- DConfigure the database table in Amazon DynamoDB with a high Provisioned Capacity mode to handle peak processing bursts.
Answer
Deploy the processing application as containerized tasks on Amazon Elastic Container Service (Amazon ECS) running on AWS Fargate, and store the metadata and results in Amazon DynamoDB configured with On-Demand capacity mode.
The correct architecture uses Amazon ECS on AWS Fargate for computing because Fargate tasks can run for up to 24 hours, easily accommodating the 20 to 25-minute execution duration while remaining serverless and charging only for active runtime. For storage, using Amazon DynamoDB with On-Demand capacity mode ensures that database costs automatically scale to zero during idle periods and immediately scale up to meet processing spikes without manual intervention or over-provisioning.
Step-by-Step Solution
Key Concept
Selecting cost-optimized serverless compute and database capacity modes based on workload duration and traffic patterns.