AWS Certified SysOps Administrator – AssociateCost and Performance OptimizationMedium

A startup is launching a new mobile gaming application that is expected to have highly variable and unpredictable usage patterns, with potential for sudden, massive spikes in demand. The backend is built using serverless AWS Lambda functions. The startup needs to ensure minimal latency for users during these spikes while keeping costs optimized. Which Lambda feature should they implement?

  1. AUtilize Amazon API Gateway caching.
  2. BImplement Lambda Provisioned Concurrency.
  3. CConfigure a larger memory size for the Lambda functions.
  4. DIncrease the Lambda function timeout setting.
Show answer & explanation

Correct answer: B. Implement Lambda Provisioned Concurrency.

Lambda Provisioned Concurrency keeps functions initialized and ready to respond in milliseconds. This eliminates cold starts and significantly reduces latency during unpredictable traffic spikes, ensuring a smooth user experience for a highly variable application. While it incurs costs for allocated concurrency, it optimizes performance during critical periods.

Why the other options are wrong

  • A. API Gateway caching reduces latency for repeated requests to static or slowly changing data, but it does not address cold starts or the execution latency of the Lambda function itself.
  • C. Larger memory size can improve execution speed for compute-intensive tasks, but it doesn't eliminate cold starts during sudden increases in invocations.
  • D. Increasing the timeout setting allows functions to run longer, but it doesn't improve initial invocation latency or prevent cold starts during spikes.

Lambda Provisioned Concurrency

A feature that keeps Lambda functions pre-initialized and ready to respond to invocations with millisecond latency.

  • Eliminates cold starts for critical applications.
  • Ideal for interactive services and high-volume, latency-sensitive workloads.
  • Incurs costs for the allocated concurrency, even when idle.

Memory trick: Lambda's 'Pre-Launch' power prevents performance pains.

More Cost and Performance Optimization questions