Question

Difficulty: Very hardAWS Compute Services

A software-as-a-service (SaaS) company is designing a backend component to process user-uploaded PDF documents. The processing job runs a proprietary executable that requires a custom Linux library. Each document takes between 2 to 5 seconds to process. The workload is highly unpredictable; the platform receives around 50 uploads scattered throughout a typical day, but can experience brief spikes of up to 1,000 uploads. The company requires a serverless compute option with zero idle costs and sub-second scaling responsiveness to minimize user wait times. Which AWS compute service should the company select to host this component?

  1. AWS Lambda with a custom container image deploymentAnswer
  2. B
    Amazon ECS using AWS Fargate to run a continuous service
  3. C
    Amazon EC2 instances configured in an Auto Scaling group
  4. D
    Amazon Lightsail container services with fixed-node provisioning

Answer

AWS Lambda with a custom container image deployment
The correct answer is the option specifying AWS Lambda with a custom container image. This service matches all requirements: it supports packaging custom binaries and libraries within container images, scales instantly to handle unpredictable spikes in traffic, and charges only when the function is executing, ensuring zero cost when idle.

Step-by-Step Solution

1
Analyze the application runtime and dependency requirements.
The application requires a custom Linux library and a proprietary executable, which can be packaged inside a Docker container image.
This requirement rules out standard zip-based runtimes but is supported by both AWS Lambda (via container images) and container orchestration services like Amazon ECS.
2
Evaluate the scaling and latency requirements.
The workload must scale to zero during inactivity and scale up sub-second during sudden bursts of up to 1,000 concurrent requests.
AWS Lambda is designed for rapid, event-driven scaling with sub-second execution startup. Running container tasks on AWS Fargate on-demand via the ECS RunTask API suffers from initialization latency (often 30+ seconds), which does not meet the sub-second response criteria.
3
Assess the cost constraints and idle state billing.
The solution must incur zero idle costs when there are no document uploads.
AWS Lambda bills strictly for the milliseconds of compute time consumed during executions, resulting in zero costs when idle. In contrast, Amazon ECS with AWS Fargate (as a service), Amazon EC2, and Amazon Lightsail all charge for running capacity regardless of whether active jobs are processing.

Key Concept

Selecting appropriate AWS compute services based on runtime dependencies, scaling behavior, startup latency, and billing models.
Estimated Time:3m 0s
Rate this question