Migrating Legacy Cron Jobs to AWS with Minimal Refactoring

SAA-C03 By islever Editorial Last updated

Short answer

C Create a container image for the cron jobs. Use Amazon EventBridge Scheduler to create a recurring schedule. Run the cron job tasks on AWS Fargate.

Question

A company is migrating a legacy application from an on-premises data center to AWS. The application relies on hundreds of cron jobs that run between 1 and 20 minutes on different recurring schedules throughout the day. The company wants a solution to schedule and run the cron jobs on AWS with minimal refactoring. The solution must support running the cron jobs in response to an event in the future. Which solution will meet these requirements?
  1. Create a container image for the cron jobs. Use Amazon EventBridge Scheduler to create a recurring schedule. Run the cron job tasks as AWS Lambda functions.
  2. Create a container image for the cron jobs. Use AWS Batch on Amazon Elastic Container Service (Amazon ECS) with a scheduling policy to run the cron jobs.
  3. Create a container image for the cron jobs. Use Amazon EventBridge Scheduler to create a recurring schedule. Run the cron job tasks on AWS Fargate. Correct Answer
  4. Create a container image for the cron jobs. Create a workflow in AWS Step Functions that uses a Wait state to run the cron jobs at a specified time. Use the RunTask action to run the cron job tasks on AWS Fargate.

Key Takeaways

The exam tests the ability to match job duration constraints (over 15 minutes) with the correct compute service, avoiding Lambda's timeout trap.

This question addresses migrating legacy cron jobs to AWS using Amazon EventBridge Scheduler and AWS Fargate to handle execution times exceeding Lambda's limits. It establishes that serverless container orchestration is the optimal path for minimal refactoring.

Common mistake: Candidates often choose AWS Lambda due to its popularity for scheduled tasks, failing to notice the '20 minutes' duration requirement which exceeds Lambda's 15-minute limit.

Expert Analysis

Why the Answer Is Correct

The correct solution is C because it leverages Amazon EventBridge Scheduler to trigger tasks on AWS Fargate. This combination allows you to run containerized applications without managing servers, satisfying the 'minimal refactoring' requirement by simply packaging the existing logic into a container image.

Why the Other Options Are Wrong

Option A is incorrect because AWS Lambda has a maximum execution timeout of 15 minutes, whereas the requirements specify jobs running up to 20 minutes. Option B uses AWS Batch, which typically involves managing EC2 instances or more complex provisioning than necessary for simple cron-like scheduling. Option D introduces unnecessary complexity with Step Functions Wait states compared to the native scheduling capabilities of EventBridge.

Community Comment Notes

Community consensus strongly supports C, citing the Lambda timeout limit as the primary differentiator. As Linuslin noted, "Lambda has 15 mins limit, so A is out." Another commenter emphasized that Fargate allows paying only for what is used, freeing users from provisioning EC2 instances.

Official Reference

Exam Strategy

Always check the execution time limits of serverless services like Lambda before selecting them for long-running tasks. For batch processing or jobs exceeding 15 minutes, consider Fargate or Batch as viable alternatives.

Frequently Asked Questions

Why not use AWS Lambda for cron jobs?

Lambda has a maximum timeout of 15 minutes. Since the requirement specifies jobs running up to 20 minutes, Lambda cannot accommodate the full duration.

Is AWS Fargate considered minimal refactoring?

Yes, if the application is already containerized. You just need to ensure the Dockerfile works in Fargate, which requires no infrastructure changes.

More SAA-C03 FAQ →

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 6 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 6

  1. Kezuko 👍 18
    Give yourself a pat on the back when you reach this question, its been a long run
  2. Linuslin 👍 4 Answered C
    Lambda has 15 mins limit, so A is out. B works, but you have to run highly-available virtual machines or containers waiting for the event to happen. C is the best answer in this question, with AWS Fargate allows you to pay for only what you use and free you from provisioning, configuring, and scaling clusters of Amazon EC2 instances. https://aws.amazon.com/blogs/containers/migrate-cron-jobs-to-event-driven-architectures-using-amazon-elastic-container-service-and-amazon-eventbridge/
  3. asdfcdsxdfc 👍 4 Answered C
    its either A or C. C looks correct because lambda works for 15 mins and the question says between 1-20
  4. seetpt 👍 2 Answered C
    C because lambda has 15min time limit.
  5. FlyingHawk 👍 1 Answered C
    As an example, one customer had hundreds of cron jobs configured on a single on-premise server. They chose to run these various cron jobs as separate scheduled tasks on Amazon Elastic Container Service (Amazon ECS) using AWS Fargate. They used Amazon EventBridge to schedule the tasks because it triggers an Amazon ECS task at scheduled times rather than having to run highly-available virtual machines or containers waiting for the event to happen. They chose Amazon ECS because of its simple container orchestration. And they chose AWS Fargate because it allows them to pay for only what they use and frees them from provisioning, configuring, and scaling clusters of Amazon EC2 instances.
Show 1 more comment
  1. cvoiceip 👍 1
    Ans : C https://aws.amazon.com/blogs/containers/migrate-cron-jobs-to-event-driven-architectures-using-amazon-elastic-container-service-and-amazon-eventbridge/

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Practice All SAA-C03 Questions

Access 120 questions with complete answers and detailed explanations.

View Full SAA-C03 Practice Test →

← Back to SAA-C03 Study Guide