
Answer-first summary for fast verification
Answer: 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.
## Explanation **Correct Answer: C** **Why Option C is correct:** 1. **Job Duration (up to 1 hour)**: AWS Lambda has a maximum execution timeout of 15 minutes, which makes it unsuitable for jobs that can take up to an hour. 2. **Large File Size (up to 10 GB)**: Lambda has memory limits (up to 10 GB) but the 15-minute timeout is the critical constraint. 3. **Minimizing Operational Effort**: AWS Fargate is a serverless compute engine for containers that eliminates the need to manage servers. With Fargate, you don't need to provision, configure, or scale EC2 instances. 4. **Known CPU/Memory Requirements**: Since the CPU and memory usage are known in advance, you can configure the Fargate task with the appropriate CPU and memory specifications. 5. **Scheduled Execution**: Amazon EventBridge can be used to schedule the ECS task to run once a day. **Why other options are incorrect:** **Option A & B (Lambda-based solutions)**: - Both options use AWS Lambda, which has a maximum timeout of 15 minutes. - The job can take up to an hour, exceeding Lambda's timeout limit. - Option B adds unnecessary complexity with API Gateway when EventBridge can directly invoke Lambda. **Option D (ECS with EC2 launch type)**: - Requires managing EC2 instances and an Auto Scaling group. - Involves operational overhead for patching, scaling, and maintaining EC2 instances. - Does not minimize operational effort as much as Fargate (serverless option). **Key AWS Services Used:** - **Amazon ECS with Fargate**: Serverless container orchestration - **Amazon EventBridge**: For scheduled events/cron jobs - **Amazon S3**: For storing sales records **Architecture Flow:** 1. EventBridge scheduled event triggers daily 2. EventBridge launches ECS task on Fargate 3. Fargate task processes S3 data (up to 10 GB files) 4. Job runs for up to 1 hour with known CPU/memory requirements 5. No server management required
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
An ecommerce company needs to run a scheduled daily job to aggregate and filter sales records for analytics. The company stores the sales records in an Amazon S3 bucket. Each object can be up to 10 GB in size. Based on the number of sales events, the job can take up to an hour to complete. The CPU and memory usage of the job are constant and are known in advance.
A solutions architect needs to minimize the amount of operational effort that is needed for the job to run.
Which solution meets these requirements?
A
Create an AWS Lambda function that has an Amazon EventBridge notification. Schedule the EventBridge event to run once a day.
B
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.
C
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.
D
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.