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

A startup is building a new microservices application using AWS Lambda functions. Each Lambda function is invoked frequently, processing small amounts of data. The company wants to minimize the operational overhead and cost associated with managing compute resources. Which compute strategy is inherently most cost-optimized for this scenario?

  1. AUtilizing Amazon EKS for container orchestration.
  2. BDeploying Lambda functions for each microservice.
  3. CProvisioning EC2 instances for each microservice.
  4. DUsing Amazon ECS with Fargate launch type.
Show answer & explanation

Correct answer: B. Deploying Lambda functions for each microservice.

AWS Lambda is a serverless compute service that automatically scales and charges only for the compute time consumed. For frequently invoked functions processing small amounts of data, this 'pay-per-use' model inherently optimizes costs by eliminating idle capacity and operational overhead.

Why the other options are wrong

  • A. EKS involves significant operational overhead for Kubernetes management and is not cost-optimized for simple, frequently invoked microservices compared to Lambda.
  • C. EC2 instances require manual scaling or Auto Scaling setup, incurring costs even when idle, and high operational overhead.
  • D. ECS Fargate is serverless for containers but still charges for provisioned compute, not just invocation time, and has a higher minimum cost than Lambda for small, frequent tasks.

AWS Lambda Cost Optimization

AWS Lambda is a serverless compute service that automatically manages underlying infrastructure and charges only for the compute time consumed when a function is invoked. This 'pay-per-use' model is highly cost-efficient for event-driven, intermittent, or frequently invoked small workloads.

  • Pay only for code execution time, not idle time.
  • Automatic scaling, no server management.
  • Cost-effective for event-driven and microservices architectures.

Memory trick: Lambda's pay-per-play saves cash every day.

More Design Cost-Optimized Architectures questions