Question

Difficulty: EasyAWS Compute Services

A company needs to run a short data processing script each time a new file is uploaded to Amazon S3. The script executes in less than a minute, and the company wants to pay only for the exact duration of the script's execution without provisioning or managing virtual servers. Which AWS service should the company use to meet these requirements?

  1. A
    Amazon EC2
  2. B
    Amazon ECS
  3. AWS LambdaAnswer
  4. D
    AWS Lightsail

Answer

AWS Lambda
AWS Lambda is the correct choice because it is a serverless, event-driven compute service. It runs code in response to triggers like Amazon S3 file uploads and charges only for the exact duration of the execution, eliminating the need to provision or manage servers.

Step-by-Step Solution

1
Identify the key workload requirements in the scenario.
The requirements are: event-driven trigger (S3 file upload), short execution time (under a minute), no server management, and paying only for the exact run time.
This helps filter out compute services that require server provisioning or charge flat rates.
2
Match the requirements to the correct AWS compute service.
AWS Lambda fits these requirements perfectly as it is an event-driven, serverless compute service billed down to the millisecond of execution.
Choosing the service that requires zero administration and offers sub-second billing aligns with the goal.

Key Concept

AWS Lambda is an event-driven, serverless compute service that runs code without provisioning or managing servers, billing only for compute time consumed.
Rate this question