Which solution will meet these requirements with the LEAST operational overhead?
Use AWS Batch to run the tasks as jobs. Schedule the jobs by using Amazon EventBridge (Amazon CloudWatch Events).
Convert the EC2 instance to a container. Use AWS App Runner to create the container on demand to run the tasks as jobs.
Copy the tasks into AWS Lambda functions. Schedule the Lambda functions by using Amazon EventBridge (Amazon CloudWatch Events).
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.
Explanations:
AWS Batch is designed for running batch jobs at scale, allowing for automatic provisioning of resources. It manages job queues, retries, and resource allocation efficiently, making it a suitable solution for scheduling and executing tasks written in different languages with minimal operational overhead. Using Amazon EventBridge for scheduling integrates seamlessly with AWS Batch.
Converting the EC2 instance to a container and using AWS App Runner would add complexity in managing containers. AWS App Runner is more suited for web applications rather than scheduled batch jobs. This solution could lead to higher operational overhead compared to AWS Batch.
While AWS Lambda can run tasks on demand and is good for short-lived tasks, it has limitations on execution time (15 minutes maximum). Additionally, converting each task to a Lambda function may not be feasible or efficient for tasks that run for an hour, leading to increased operational overhead.
Creating an Auto Scaling group based on an AMI of the EC2 instance could improve scalability but would increase operational overhead due to the need for managing the scaling policies, health checks, and potential costs of running multiple instances continuously, even when tasks are not running.