Soru

Zorluk: OrtaServerless and Automated Scaling Architectures for Cost Efficiency

A media company is developing a web platform where users upload high-resolution video files. The uploads occur unpredictably throughout the day. The company requires a cost-effective, scalable architecture to perform two tasks for each upload:

1. Write metadata to a database in the exact sequence in which the uploads occurred to maintain a chronological audit log.
2. Run a CPU-intensive transcoding pipeline that takes between 30 and 45 minutes to process each video.

Which combination of actions should a solutions architect recommend to meet these requirements cost-effectively? (Select TWO.)

  1. Configure Amazon EventBridge to route S3 upload events to an Amazon SQS FIFO queue, which triggers an AWS Lambda function to write metadata to the database.Cevap
  2. Run the transcoding pipeline using AWS Batch with an AWS Fargate Spot compute environment.Cevap
  3. C
    Configure Amazon S3 event notifications to send upload events to a standard Amazon SQS queue, which triggers an AWS Lambda function to write metadata to the database.
  4. D
    Configure an AWS Lambda function to execute the video transcoding pipeline directly upon S3 upload.
  5. E
    Store the video metadata in an Amazon DynamoDB table using provisioned capacity mode with high write capacity units (WCUs) to handle the peak upload spikes.

Cevap

Configure Amazon EventBridge to route S3 upload events to an Amazon SQS FIFO queue triggering an AWS Lambda function, and run the transcoding pipeline using AWS Batch with an AWS Fargate Spot compute environment.
The correct combination uses Amazon EventBridge to send S3 events to an Amazon SQS FIFO queue, which triggers AWS Lambda to sequentially write metadata to the database, ensuring strict ordering. It also uses AWS Batch with AWS Fargate Spot to process long-running transcoding tasks, bypassing the 15-minute Lambda limit in a serverless, highly cost-optimized manner.

Adım Adım Çözüm

1
Analyze the ordering requirement for metadata tracking.
The requirement demands processing uploads in the exact sequence they occurred. Standard Amazon SQS queues do not guarantee ordering, so an SQS FIFO queue is required. S3 event notifications cannot target SQS FIFO queues directly, so routing S3 upload events through Amazon EventBridge to the SQS FIFO queue is the correct pattern.
Ensures that the chronological audit log maintains strict event sequence.
2
Analyze the transcoding duration and compute requirements.
The transcoding process takes 30 to 45 minutes. Since AWS Lambda has a maximum execution limit of 15 minutes, it is physically impossible to run the entire transcoding pipeline on Lambda. Instead, running containerized transcoding tasks using AWS Batch with AWS Fargate Spot instances provides a fully serverless, auto-scaling, and highly cost-efficient solution.
Bypasses the Lambda execution limit while optimizing compute costs for variable batch workloads.
3
Evaluate the database scaling and cost requirements.
Using Provisioned Capacity Mode for an unpredictable database workload requires over-provisioning to handle spikes, leading to high idle costs. Using Amazon DynamoDB on-demand capacity mode would scale automatically and only charge per request, but the options only suggest either the SQS FIFO/EventBridge integration or provisioned capacity. Rejecting provisioned capacity is necessary for cost optimization.
Aligns the architecture with the AWS Well-Architected Framework's cost optimization pillar.

Anahtar Kavram

Selecting the appropriate compute, queueing, and scaling options to support long-running processes and strict sequencing while minimizing idle capacity costs.
Tahmini Süre:2m 0s
Bu soruyu puanla