Running Stateful Jobs on AWS Fargate with EventBridge
Short answer
A Schedule an Amazon ECS task on AWS Fargate using EventBridge Scheduler to run the containerized job without interruption risk.
Question
Key Takeaways
The core trap is ignoring the 'stateful' and 'cannot tolerate interruptions' constraints, which immediately disqualifies Spot Instances and short-lived serverless functions like Lambda.
This question evaluates the selection of AWS compute services for stateful, long-running scheduled tasks. The correct solution leverages Amazon ECS on AWS Fargate to ensure uninterrupted execution beyond Lambda's time limits.
Common mistake: Many candidates choose Lambda (Option B) because it is easy to schedule, failing to notice that its maximum execution timeout is 15 minutes, which is insufficient for a 1-hour job.
Expert Analysis
Why the Answer Is Correct
Option A is the only viable choice because AWS Fargate provides a serverless compute engine for containers that supports longer execution times without the interruption risks associated with Spot Instances. By using Amazon ECS, the containerized job can run for the required hour or more while maintaining state. Amazon EventBridge Scheduler is the appropriate service to trigger this task on a weekly schedule.
Why the Other Options Are Wrong
Option B fails because AWS Lambda has a maximum execution timeout of 15 minutes, making it impossible to complete a 1-hour job in a single invocation. Option C is incorrect because Amazon EC2 Spot Instances can be interrupted by AWS with only a two-minute warning, violating the requirement that the job cannot tolerate interruptions. Option D is invalid because AWS DataSync is a data transfer service, not a general-purpose compute platform for running custom analysis jobs.
Community Comment Notes
Community consensus strongly supports Option A. As user Hkayne noted, "B is wrong because the job takes 1 hour and the lambda maximum execution time is 15 minutes." Another commenter emphasized that Spot instances are unreliable for stateful workloads: "C is wrong can't use spot instances because the job can not tolerate interruptions." Users also correctly identified that DataSync is not designed for launching arbitrary jobs.
Official Reference
- https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-task-limits.html
- https://docs.aws.amazon.com/lambda/latest/dg/limits.html
These links open the official vendor documentation in a new tab.
Exam Strategy
Always check the execution duration limits of serverless options like Lambda before selecting them for long-running tasks. For stateful jobs, avoid Spot Instances unless you have implemented robust checkpointing and restart logic, as they are not guaranteed to stay running.
Frequently Asked Questions
Why can't I use AWS Lambda for a 1-hour job?
Is Amazon EventBridge Scheduler better than CloudWatch Events?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 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 5
-
Hkayne 👍 5 Answered AB is wrong because the job takes 1 hour and the lambda maximum execution time is 15 minutes. C is wrong can't use spot instances because the job can not tolerate interruptions. D iswrong too because DataSync is not designed to lunch jobs. Correct answer is A
-
Scheldon 👍 4 Answered AAnswer: A Fargate is compatibilie with ECS and is allowing for log running tasks
-
mk168898 👍 1B is not because lambda only max 15mins but job requires 1 hour C is not because cannot tolerate interruptions, spot instance might be gone anytime. D datasync doesn't seem correct A is most correct
-
muhammadahmer36 👍 1 Answered AA. Create a container for the job. Schedule the job to run as an AWS Fargate task on an Amazon Elastic Container Service (Amazon ECS) cluster by using Amazon EventBridge Scheduler.
-
744fdad 👍 1I know datasync and lambda is event based, there are interruptions. C, doesnt address the scheduling requirement. Has to be A
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →