Question #1839
A company is migrating batch processing jobs from an on-premises environment to AWS. The jobs run on specific recurring schedules, with each job taking between 15 and 30 minutes to complete. The solution must require minimal code changes and support triggering jobs based on future events. Which approach meets these requirements?
Package the jobs into container images. Use Amazon EventBridge Scheduler to create recurring schedules and trigger the jobs as AWS Lambda functions.
Package the jobs into container images. Configure AWS Batch with Amazon ECS and a cron-based scheduling policy to execute the jobs.
Package the jobs into container images. Use Amazon EventBridge Scheduler to create recurring schedules and trigger the jobs as tasks on AWS Fargate.
Package the jobs into container images. Design an AWS Step Functions workflow with a Wait state to delay execution until a specified time. Use the RunTask action to execute the jobs on Amazon EC2 instances.
Explanation
Answer C meets all requirements:
1. Minimal Code Changes: Packaging jobs into containers avoids rewriting code.
2. Future Event Triggers: EventBridge Scheduler supports both recurring schedules and one-time future triggers.
3. Runtime Flexibility: AWS Fargate handles 15-30 minute jobs without time limits (unlike Lambda in A).
Why others are incorrect:
- A: Lambda's 15-minute timeout cannot handle 30-minute jobs.
- B: AWS Batch's cron-based scheduling lacks native support for ad-hoc future events.
- D: Step Functions with Wait states adds complexity, and EC2 requires instance management.
Key Points:
- Use EventBridge Scheduler for flexible scheduling.
- Fargate is ideal for containerized batch jobs with variable durations.
Answer
The correct answer is: C