Q16 — AWS SAA-C03 Ch.5

Question 16 of 65 | ← Chapter 5

Q316. 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?

Correct Answer: B. Copy the code into an AWS IAMbdafunction that has 1 GB of memory. Create an Amazon EventBridge scheduled rule to run the code each hour

Explanation

AWS Lambda automatically scales resources to handle the workload, so you don't have to worry about managing the underlying infrastructure. It provisions the necessary compute resources based on the configured memory size (1 GB in this case) and executes the job in a serverless environment.By using Amazon EventBridge, you can create a scheduled rule to trigger the Lambda function every hour, ensuring that the job runs on the desired interval.