AWS Certified Solutions Architect – Associate (SAA-C03) — Question 598
A solutions architect is creating a data processing job that runs once daily and can take up to 2 hours to complete. If the job is interrupted, it has to restart from the beginning.
How should the solutions architect address this issue in the MOST cost-effective manner?
Answer options
- A. Create a script that runs locally on an Amazon EC2 Reserved Instance that is triggered by a cron job.
- B. Create an AWS Lambda function triggered by an Amazon EventBridge scheduled event.
- C. Use an Amazon Elastic Container Service (Amazon ECS) Fargate task triggered by an Amazon EventBridge scheduled event.
- D. Use an Amazon Elastic Container Service (Amazon ECS) task running on Amazon EC2 triggered by an Amazon EventBridge scheduled event.
Correct answer: C
Explanation
Amazon ECS with AWS Fargate is the most cost-effective option because it runs serverless containers on demand, meaning you only pay for the exact 2 hours of compute used daily. AWS Lambda is unsuitable because its maximum execution limit is 15 minutes, whereas this task requires up to 2 hours. Running dedicated Amazon EC2 instances (either standalone or for ECS) would incur unnecessary costs for idle time during the remaining 22 hours of the day.