A financial services company needs to process transaction logs that are uploaded to an Amazon S3 bucket throughout the day. Each processing job is short-lived, taking less than two minutes to complete, and the volume of logs fluctuates unpredictably. The company wants a serverless solution that only incurs costs when the processing code is running. Which AWS compute service should the company use to meet these requirements?
- AAmazon EC2
- BAWS Lightsail
- AWS LambdaAnswer
- DAmazon ECS on AWS Fargate
Answer
AWS Lambda is the most appropriate service because it is serverless, automatically scales in response to S3 upload events, and only bills for the compute time used while processing the files.
AWS Lambda is designed for short-lived, event-driven workloads. It integrates directly with Amazon S3 to run code in response to file uploads, scales automatically to handle fluctuating volumes, and does not charge for idle time, meeting all requirements.
Step-by-Step Solution
Key Concept
AWS Lambda is an event-driven, serverless compute service that enables running code without provisioning or managing servers, scaling automatically, and charging only for the compute time consumed.