
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A company has migrated an application to Amazon EC2 Linux instances. One of these EC2 instances runs several 1-hour tasks on a schedule. These tasks were written by different teams and have no common programming language. The company is concerned about performance and scalability while these tasks run on a single instance. A solutions architect needs to implement a solution to resolve these concerns.
Which solution will meet these requirements with the LEAST operational overhead?
A
Use AWS Batch to run the tasks as jobs. Schedule the jobs by using Amazon EventBridge (Amazon CloudWatch Events).
B
Convert the EC2 instance to a container. Use AWS App Runner to create the container on demand to run the tasks as jobs.
C
Copy the tasks into AWS Lambda functions. Schedule the Lambda functions by using Amazon EventBridge (Amazon CloudWatch Events).
D
Create an Amazon Machine Image (AMI) of the EC2 instance that runs the tasks. Create an Auto Scaling group with the AMI to run multiple copies of the instance.
Explanation:
Correct Answer: A
AWS Batch is the optimal solution for this scenario because:
Handles diverse programming languages: AWS Batch can run jobs written in different programming languages without requiring code changes, as it runs containerized applications.
Manages compute resources automatically: AWS Batch dynamically provisions the optimal quantity and type of compute resources (EC2 instances or Fargate) based on the volume and specific resource requirements of the batch jobs.
Scheduling integration: Amazon EventBridge can schedule AWS Batch jobs, providing a serverless event bus to trigger batch jobs at specified times.
Least operational overhead: AWS Batch eliminates the need to install and manage batch computing software or server clusters, and handles job queuing, execution, and scaling automatically.
Performance and scalability: AWS Batch automatically scales compute resources to meet job demands, ensuring tasks don't compete for resources on a single instance.
Why other options are not optimal:
Option B (AWS App Runner): While App Runner can run containers, it's designed for web applications and APIs, not batch processing. It would require converting tasks to containers and may not handle long-running (1-hour) tasks efficiently.
Option C (AWS Lambda): Lambda functions have a maximum execution timeout of 15 minutes, so they cannot handle 1-hour tasks. Lambda is designed for short-lived, event-driven functions.
Option D (Auto Scaling group with AMI): This approach would create multiple EC2 instances running the same tasks, potentially leading to duplicate execution and resource waste. It doesn't provide job-level scheduling or efficient resource utilization for batch workloads.
AWS Batch is specifically designed for batch computing workloads, making it the most appropriate service for running scheduled, long-running tasks with minimal operational overhead.