A lightweight API is called only a few hundred times per day at unpredictable intervals. The team wants to pay only when it runs and avoid managing servers. Which option is most cost-effective?
A) A small On-Demand EC2 instance running 24/7.
B) AWS Lambda behind API Gateway.
C) A Reserved Instance.
D) An Auto Scaling Group with a minimum of two instances.
Correct Answer: B
Explanation: Lambda charges only per request and execution time, with no idle cost, making it ideal for sporadic, low-volume workloads with no server management. (A) pays for 24/7 idle time. (C) commits to continuous usage. (D) keeps at least two instances always running — wasteful for low traffic.