📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials AWS Solutions Architect Lambda Concurrency and Throttling

Lambda Concurrency and Throttling

4 min read Quiz at the end
Understand Lambda reserved, unreserved, and provisioned concurrency. Design for throttling behavior and downstream service protection.

Lambda Concurrency — Managing Scale

Lambda concurrency is the number of function instances running simultaneously. Understanding concurrency is crucial for designing reliable serverless architectures that do not overwhelm downstream services.

Types of Concurrency

TypeDescriptionUse Case
UnreservedDefault — shares pool with all other functions in accountMost Lambda functions
ReservedGuarantee N instances for this function — steals from othersCritical functions that must never be throttled
ProvisionedPre-warm N instances — always ready, no cold startsLatency-sensitive functions

Account-Level Concurrency Limits

Default Lambda concurrency limit per region: 1,000 concurrent executions

If 10 functions each run 100 instances:
  Total: 1,000 (at limit)
  
If function A needs 900 instances (traffic spike):
  Only 100 left for all other functions!
  Risk: other functions throttled
  
Solution: Use Reserved Concurrency
  Reserve 200 for function A (max it can use)
  Leave 800 for other functions
  Function A cannot steal from others

Throttling Behavior

When Lambda is throttled:
  Synchronous invocation (API Gateway):
    --> Returns 429 Too Many Requests immediately
    --> Client must retry with backoff
  
  Asynchronous invocation (S3, SNS):
    --> Lambda retries automatically (up to 6 hours)
    --> Failed events go to Dead Letter Queue (DLQ) or Lambda Destination

Lambda Function URLs and Concurrency

# Reserved concurrency = 0 means function is completely disabled
# Useful for: emergency disable without deleting function
aws lambda put-function-concurrency 
  --function-name my-function 
  --reserved-concurrent-executions 0  # Throttles ALL invocations
Exam Tip: Set Reserved Concurrency for ANY Lambda that calls a database or API with rate limits. Without it, a traffic spike could create 1,000 Lambda functions simultaneously overwhelming your RDS max_connections or a third-party API rate limit. Reserved concurrency acts as a circuit breaker.