Question

Difficulty: EasyAWS Compute Services

A developer is writing a short, event-driven script that processes user profile images immediately after they are uploaded. The script runs for less than a minute and executes occasionally throughout the day. The developer wants to execute this code without provisioning or managing any virtual servers. Which AWS service is the most appropriate choice for this task?

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

Answer

AWS Lambda is the most appropriate service for executing event-driven scripts without provisioning or managing virtual servers.
AWS Lambda is a serverless, event-driven compute service that executes code in response to triggers (such as image uploads) and automatically manages the underlying compute resources. This eliminates the need to provision or manage virtual servers, matching the scenario requirements perfectly.

Step-by-Step Solution

1
Analyze the workload requirements: the script runs for less than a minute, runs occasionally (event-driven), and must run without server management overhead.
Identified a serverless, short-lived, event-driven workload requirement.
Understanding the execution pattern helps rule out persistent virtual servers.
2
Evaluate the compute options: Amazon EC2 and Amazon Lightsail require provisioning and managing virtual servers; AWS Lambda runs code in response to events without server management.
Selected AWS Lambda as the matching service.
AWS Lambda scales automatically and runs only when triggered, charging only for the exact duration of the execution.

Key Concept

Selecting serverless compute services based on operational and execution characteristics.
Rate this question