Soru

Zorluk: OrtaServerless and Automated Scaling Architectures for Cost Efficiency

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.)

  1. Run the processing application as containerized tasks using Amazon Elastic Container Service (Amazon ECS) on AWS Fargate.Cevap
  2. Use Amazon DynamoDB with On-Demand capacity mode to store the metadata and results.Cevap
  3. C
    Use AWS Lambda functions to execute the file processing logic directly.
  4. D
    Configure the database table in Amazon DynamoDB with a high Provisioned Capacity mode to handle peak processing bursts.

Cevap

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.

Adım Adım Çözüm

1
Analyze the compute requirements, specifically the job execution duration.
The processing jobs run for 20 to 25 minutes, which exceeds the AWS Lambda maximum execution timeout of 15 minutes.
This rules out AWS Lambda for hosting the file processing logic directly, pointing to Amazon ECS on AWS Fargate as the serverless container compute choice.
2
Analyze the database capacity needs and traffic patterns.
The workload is highly unpredictable with spikes and long periods of complete inactivity.
This rules out Provisioned Capacity mode for Amazon DynamoDB due to high idle costs, and dictates using On-Demand capacity mode to align cost directly with actual usage.

Anahtar Kavram

Selecting cost-optimized serverless compute and database capacity modes based on workload duration and traffic patterns.
Bu soruyu puanla