Whenever an image is uploaded to an S3 bucket, the company needs to generate a thumbnail automatically. Traffic is sporadic and unpredictable. Which compute option is most efficient?
A) A fleet of always-on EC2 instances polling the bucket.
B) An AWS Lambda function triggered by an S3 event notification.
C) A scheduled batch job that runs hourly on EC2.
D) An on-premises server with a cron job.
Correct Answer: B
Explanation: AWS Lambda runs code in response to S3 event notifications, scaling automatically per upload and charging only for execution time — ideal for sporadic, event-driven work. (A) wastes money when idle. (C) adds latency and may mis-provision. (D) abandons cloud elasticity and integration.