A company needs to design a cost-effective, serverless architecture for a daily data import pipeline. Once a night, a partner system uploads a batch of files containing transactional logs to an Amazon S3 bucket. A processing job must fetch these files, sort and process the records in strict chronological order, and write the output files to a temporary S3 folder. Another internal analytics system reads and permanently deletes these output files within 48 hours. The daily sorting and processing job is CPU-heavy and typically runs continuously for 3 hours. Which architecture is the most cost-effective and appropriate for this workload?
- APublish the file metadata to an Amazon SQS standard queue to trigger AWS Lambda functions, configuring the functions to process messages sequentially to preserve chronological ordering.
- BRun the processing job inside an Amazon ECS task using the AWS Fargate launch type, scheduled daily via Amazon EventBridge, and write the output files to an Amazon S3 Standard-Infrequent Access (S3 Standard-IA) bucket.
- Run the processing job inside an Amazon ECS task using the AWS Fargate launch type, scheduled daily via Amazon EventBridge, and store the output files in an Amazon S3 Standard bucket.Answer
- DDeploy the processing script as an AWS Lambda function triggered by Amazon S3 event notifications, configuring the function with maximum memory allocation to complete the workload.
Answer
Running the processing job inside an Amazon ECS task on AWS Fargate scheduled via Amazon EventBridge, and storing the output files in an Amazon S3 Standard bucket.
The correct option is to run the processing job inside an Amazon ECS task on AWS Fargate, scheduled daily via Amazon EventBridge, and store the output files in an Amazon S3 Standard bucket. Amazon ECS on AWS Fargate provides a serverless compute option that can run containerized tasks for several hours without execution timeouts, charging only for the resources consumed while running. Amazon S3 Standard is the most cost-effective storage class for temporary files deleted within 48 hours because it does not enforce a minimum storage duration charge.
Step-by-Step Solution
Key Concept
Matching serverless compute limits and S3 storage lifecycle characteristics to optimize workload costs.
Estimated Time:1m 30s