01 / 03

What is concurrency in AWS Lambda?

Concurrency in AWS Lambda refers to the number of instances of a function that can run simultaneously. When multiple events invoke a Lambda function at the same time, AWS Lambda launches multiple instances (up to a limit) to handle the load in parallel. This helps in handling scale and latency effectively for event-driven workloads.

Types of Concurrency in Lambda
  1. 1

    Unreserved Concurrency: The default concurrency pool shared by all functions in an account.

  2. 2

    Reserved Concurrency: Dedicates a fixed number of concurrent executions to a specific function.

  3. 3

    Provisioned Concurrency: Pre-initializes Lambda instances so they’re ready to respond instantly, ideal for low-latency needs.

Important Notes About Lambda Concurrency
  1. 1

    Each function can scale up to the regional concurrency limit by default (e.g., 1,000 concurrent executions).

  2. 2

    Setting reserved concurrency for a function prevents other functions from affecting its concurrency.

  3. 3

    Provisioned concurrency helps eliminate cold starts for high-performance applications.

CLI Command to Set Reserved Concurrency