Which solution meets these requirements?
Create an AWS Lambda function that has an Amazon EventBridge notification. Schedule the EventBridge event to run once a day.
Create an AWS Lambda function. Create an Amazon API Gateway HTTP API, and integrate the API with the function. Create an Amazon EventBridge scheduled event that calls the API and invokes the function.
Create an Amazon Elastic Container Service (Amazon ECS) cluster with an AWS Fargate launch type. Create an Amazon EventBridge scheduled event that launches an ECS task on the cluster to run the job.
Create an Amazon Elastic Container Service (Amazon ECS) cluster with an Amazon EC2 launch type and an Auto Scaling group with at least one EC2 instance. Create an Amazon EventBridge scheduled event that launches an ECS task on the cluster to run the job.
Explanations:
AWS Lambda has a maximum execution time limit of 15 minutes, which is insufficient for this job that can take up to an hour to complete. Additionally, Lambda functions may not be suitable for processing large files (up to 10 GB) stored in S3, as they are designed for short-lived, event-driven workloads.
Similar to option A, AWS Lambda cannot run for longer than 15 minutes, which does not meet the job’s requirement of potentially taking an hour. Furthermore, using API Gateway adds unnecessary complexity for a scheduled job that doesn’t require API interaction.
Using Amazon ECS with AWS Fargate allows for running containers without managing servers. Fargate supports tasks that can run for longer than 15 minutes and can handle large data processing jobs efficiently. The EventBridge scheduled event can trigger the ECS task daily with minimal operational effort.
While using Amazon ECS with an EC2 launch type can also accommodate longer job durations, it requires managing EC2 instances and an Auto Scaling group, which increases operational overhead. Fargate is a more efficient choice for minimizing operational effort while still meeting the job’s requirements.