QuestionQ67

VerifiedDesign Cost-Optimized Architectures

A company has an application that customers use to upload images to an Amazon S3 bucket. Each night, the company starts an Amazon EC2 Spot Fleet to process all images that were received that day. Processing each image takes 2 minutes and requires 512 MB of memory.

A solutions architect needs to modify the application so the images are processed when they are uploaded.

Which change will meet these requirements MOST cost-effectively?

Explanation

AWS Lambda is the most cost-effective fit for per-upload, event-driven image processing because it runs only when needed and the stated workload fits within Lambda’s limits: 2 minutes of processing is well below the 15-minute maximum execution time. Amazon S3 supports event notifications to Amazon SQS, and Lambda can consume from SQS to process each uploaded image asynchronously without maintaining always-on servers. Using Reserved Instances, ECS container instances, or Elastic Beanstalk would require provisioned compute and would generally cost more for this short, sporadic processing pattern.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!