A finance office validates uploaded budget files only once each night for a few minutes. Why prefer AWS Lambda over always-on EC2 for that job?
Select an answer to reveal the explanation.
Short Explanation
A few minutes once a night is the poster child for Lambda—run, finish, stop paying for idle iron. Always-on EC2 would sit around bored most of the day. EC2 can do schedules, but Lambda is the better fit for short intermittent work.
Full Explanation
AWS Lambda charges for execution duration and is well suited to intermittent, event-driven, or scheduled tasks such as nightly file validation. Always-on EC2 instances incur charges while idle, which is inefficient for brief nightly jobs. EC2 remains appropriate for long-running or specialized workloads; the distinction is fit, not absolute capability. Function packages are not a substitute for durable large-scale database storage.