
Answer-first summary for fast verification
Answer: Migrate the job to an AWS Lambda function with 1 GB memory, triggered by an Amazon EventBridge hourly schedule.
The correct answer is B. Using AWS Lambda and Amazon EventBridge is the most cost-effective solution for the given scenario. The job runs every hour for only 10 seconds, and Lambda functions are designed for short executions, making them suitable for this use case. Additionally, with Lambda, you only pay for the compute time you consume, which significantly reduces cost compared to running an EC2 instance continuously. EventBridge can easily schedule the job to run at the required interval.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A company operates a Java job on an Amazon EC2 instance, scheduled hourly, lasting 10 seconds, and using 1 GB memory. CPU usage peaks during job execution but is otherwise minimal. What is the most cost-effective solution for running this job?
A
Containerize the job with AWS App2Container and execute it on AWS Fargate using Amazon ECS, allocating 0.5 vCPU and 1 GB memory.
B
Migrate the job to an AWS Lambda function with 1 GB memory, triggered by an Amazon EventBridge hourly schedule.
C
Containerize the job with AWS App2Container, deploy in the existing AMI, and automate container stoppage post-task completion.
D
Modify the schedule to stop the EC2 instance after job execution and start it again for the next job.
No comments yet.