A company has an application where customers upload images to an Amazon S3 bucket. Each night, the company launches an Amazon EC2 Spot Fleet to process the day's images. Processing each image takes 2 minutes and requires 512 MB of memory. A solutions architect must change the application to process images as they are uploaded. Which change meets the requirements MOST cost-effectively?
Choose an answer
Tap an option to check your answer.
Correct answer: Use S3 Event Notifications to write a message with image details to an Amazon Simple Queue Service (Amazon SQS) queue. Configure an AWS Lambda function to read messages from the queue and process the images..
Why this is the answer
The correct option leverages S3 Event Notifications to trigger an event when an image is uploaded. Sending these events to an SQS queue provides a reliable buffer for messages, decoupling the image upload from processing. An AWS Lambda function is ideal for processing individual images because it is serverless, scales automatically based on the number of messages in the SQS queue, and you only pay for the compute time consumed (2 minutes per image, 512 MB memory), making it highly cost-effective for intermittent, event-driven workloads. Using an EC2 Reserved Instance is less cost-effective because it incurs continuous costs regardless of processing load and requires managing servers. Using Amazon SNS with ECS or Elastic Beanstalk involves managing container instances or application servers, which are less cost-effective for this specific, intermittent, and short-duration task compared to the serverless, pay-per-execution model of Lambda.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed