CLF-C02 Question 174
Single answerA company is building a serverless web application. The application involves running short-lived code to process incoming user data in near real-time, and the company wants to avoid managing server infrastructure. Which AWS service should the company use to achieve this?
- A
AWS Lambda
- B
Amazon EC2
- C
AWS Fargate
- D
Amazon S3
Show answer and explanation
Correct answer: A
Explanation
AWS Lambda is the most appropriate choice for running short-lived, event-driven code in a serverless environment. It eliminates the need to manage server infrastructure and is specifically designed for tasks like processing incoming data in real-time, aligning perfectly with the company's requirements.
- A. Correct.
AWS Lambda is a serverless compute service designed for short-lived, event-driven tasks, making it the best choice for this use case.
- B. Incorrect.
Amazon EC2 is a virtual server service that requires infrastructure management and is not serverless, so it is not suitable for this scenario.
- C. Incorrect.
AWS Fargate is a serverless container service, which is more suitable for running containerized applications rather than short-lived event-driven tasks.
- D. Incorrect.
Amazon S3 is an object storage service and does not provide compute capabilities, so it is not relevant to the task of processing user data.