AWS Certified Solutions Architect – Associate (SAA-C03)Design Cost-Optimized ArchitecturesEasy

A startup is developing a new mobile application that requires a serverless backend. The application will experience highly variable traffic, with unpredictable spikes and periods of low activity. The company wants to minimize operational overhead and only pay for the compute resources consumed. Which AWS compute service best meets these requirements?

  1. AAWS Fargate on ECS
  2. BAWS Lambda
  3. CAmazon ECS on EC2
  4. DAmazon EC2 Auto Scaling
Show answer & explanation

Correct answer: B. AWS Lambda

AWS Lambda is a serverless compute service that automatically scales and allows you to run code without provisioning or managing servers. You only pay for the compute time consumed, making it highly cost-effective for variable and unpredictable workloads and minimizing operational overhead.

Why the other options are wrong

  • A. AWS Fargate on ECS is a serverless compute engine for containers, reducing server management, but Lambda is typically more cost-effective for event-driven, function-based workloads with highly variable traffic due to its granular billing model (per invocation and duration).
  • C. Amazon ECS on EC2 requires managing EC2 instances and their scaling, incurring costs even when containers are idle or not fully utilized.
  • D. EC2 Auto Scaling helps manage EC2 instances but still involves managing servers and paying for instance uptime, not just execution time.

AWS Lambda

AWS Lambda is a serverless, event-driven compute service that lets you run code without provisioning or managing servers.

  • Pay only for compute time consumed (per millisecond).
  • Automatically scales with demand.
  • No server management overhead.
  • Integrates with many AWS services as event sources.

Memory trick: Pick the right compute engine for your code, like choosing a vehicle for your journey.

More Design Cost-Optimized Architectures questions