AWS Certified Solutions Architect – Associate (SAA-C03) — Question 472

A company runs a Java-based job on an Amazon EC2 instance. The job runs every hour and takes 10 seconds to run. The job runs on a scheduled interval and consumes 1 GB of memory. The CPU utilization of the instance is low except for short surges during which the job uses the maximum CPU available. The company wants to optimize the costs to run the job.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

AWS Lambda is the most cost-effective solution for short-lived, intermittent workloads because billing is based on the exact execution duration of 10 seconds rather than idle compute time. Triggering the function hourly via an Amazon EventBridge schedule completely eliminates the administrative and resource overhead of managing servers. Other options involving EC2 or Fargate incur unnecessary provisioning delays and higher baseline costs for a task that runs for only 10 seconds per hour.