Design Cost-Optimized Architectures
A company processes a few dozen Amazon S3 uploads each day, with hours between uploads. Each processing task takes 20 seconds and requires no persistent local state; which compute option avoids idle compute charges and minimizes infrastructure management?
Show the answer
Correct answerB. An AWS Lambda function invoked by S3 events
AWhy not this: A minimum capacity of one keeps an EC2 instance running and billable between uploads.
BWhy this is right: Lambda runs in response to upload events without maintaining idle compute capacity.
CWhy not this: A continuously running Fargate task incurs charges even when no files need processing.
DWhy not this: An always-running EC2 instance incurs idle charges and requires instance management.
AWS Lambda fits short, event-driven processing and has no idle compute charges between invocations. AWS Fargate removes server management, but a continuously running task still incurs charges while waiting for uploads.