Question

Difficulty: EasyModernizing Workloads with Serverless Architectures (Lambda and API Gateway)

A company is migrating its customer-facing booking application to a serverless architecture using Amazon API Gateway and AWS Lambda. The backend Lambda function integrates with a legacy third-party inventory database that can only support a maximum of 30 concurrent database connections. During peak hours, traffic spikes cause the database to crash due to too many simultaneous connections from the Lambda function. Which configuration should the solutions architect implement to limit the concurrent executions of the Lambda function to a maximum of 30?

  1. Configure reserved concurrency with a limit of 30 on the Lambda function.Answer
  2. B
    Configure provisioned concurrency with a value of 30 on the Lambda function.
  3. C
    Configure a canary deployment in Amazon API Gateway to limit traffic to 30% of peak capacity.
  4. D
    Set up an AWS KMS customer managed key to encrypt the Lambda environment variables and limit concurrent decryptions to 30.

Answer

Configure reserved concurrency with a limit of 30 on the Lambda function.
Configuring reserved concurrency on the Lambda function sets a strict maximum limit on the number of concurrent executions. This ensures that the function will never open more than 30 connections to the legacy database, preventing it from crashing during high traffic periods.

Step-by-Step Solution

1
Identify the primary scaling constraint of the architecture.
The legacy downstream inventory database has a strict threshold of 30 concurrent connections.
We must restrict the backend Lambda function from scaling beyond 30 concurrent executions to prevent database exhaustion.
2
Evaluate the difference between reserved concurrency and provisioned concurrency in AWS Lambda.
Reserved concurrency acts as both a reservation and a hard limit on the function's maximum concurrency. Provisioned concurrency only prepares execution environments in advance and does not cap maximum concurrency.
Only reserved concurrency satisfies the requirement of capping the maximum number of concurrent executions to protect downstream resources.
3
Select the correct configuration parameter.
Setting the reserved concurrency configuration value to 30 on the Lambda function.
This guarantees that any invocation requests beyond 30 concurrent executions will be throttled, maintaining database stability.

Key Concept

AWS Lambda Reserved Concurrency
Rate this question