Skip to Content

Lambda limits and concurrency

The Lambda limits to know, concurrency and throttling, reserved concurrency, asynchronous retries, cold starts, provisioned concurrency and SnapStart.

Limits to know (per Region)

Execution:

  • Memory: 128 MB to 10,240 MB (10 GB), in 1 MB steps.
  • Maximum execution time (timeout): 900 seconds (15 minutes) in the exam material; now 1,800 seconds (30 minutes), see the box below.
  • Environment variables: 4 KB in total.
  • Disk space in /tmp: 512 MB to 10 GB.
  • Concurrent executions: 1,000 by default per account per Region (can be increased).

Deployment:

  • Deployment package (zipped): 50 MB when uploaded directly (larger through S3).
  • Unzipped deployment (code + dependencies, including layers): 250 MB.
  • Use the /tmp directory to load other files at startup.
  • Container image: up to 10 GB.

Payloads: 6 MB for synchronous requests and responses; 1 MB for asynchronous invocations.

Updated since the slides

On 19 November 2026, AWS doubled Lambda's maximum timeout from 15 minutes to 30 minutes (1,800 seconds). AWS only tests a feature after it has been available for at least three months (see how current is the exam), so until at least February 2027 exam questions are written around 15 minutes. If a question says a job runs longer than 15 minutes and asks what to use instead of Lambda, the intended answer is still ECS/Fargate, Batch or Step Functions. The asynchronous payload limit also grew from 256 KB to 1 MB.

AWS has also added new Lambda options newer than the course: the original function type is now called a Lambda Event Function, alongside Lambda Web Functions (HTTP servers), Lambda MicroVMs and Lambda Managed Instances (functions on EC2 capacity). They aren't on the exam yet.

Concurrency and throttling

Why reserve concurrency: a traffic spike through an ALB makes function A use all 1,000 executions allowed in the account, so function B behind API Gateway and function C called by the SDK are throttled; reserved concurrency fixes it Why reserve concurrency: a traffic spike through an ALB makes function A use all 1,000 executions allowed in the account, so function B behind API Gateway and function C called by the SDK are throttled; reserved concurrency fixes it

One busy function can starve all the others.

Concurrency is the number of function instances running at the same moment. The account limit (1,000 by default) is shared by all functions in the Region.

  • Reserved concurrency can be set on a function. It's both a limit (the function can't use more) and a guarantee (the rest of the account can't take it). It's free.
  • Each invocation over the limit triggers a throttle:
    • synchronous invocation → returns a ThrottleError (HTTP 429);
    • asynchronous invocation → retried automatically, then sent to a dead-letter queue (or failure destination).
  • For a higher account limit, open a request in Service Quotas (or a support ticket).

The problem without reserved concurrency: a traffic spike through an ALB makes one function scale to 1,000 executions. Every other function in the account (behind API Gateway, called by the SDK) is now throttled. Reserving concurrency for critical functions prevents this. It also protects downstream systems, for example capping a function so it can't open too many database connections.

Concurrency and asynchronous invocations

For asynchronous events (such as S3 events), if the function doesn't have enough concurrency, extra requests are throttled:

  • For throttling errors (429) and system errors (500-series), Lambda returns the event to its internal queue and tries again for up to 6 hours.
  • The retry interval grows exponentially, from 1 second after the first attempt to a maximum of 5 minutes.
  • If the function itself returns an error, Lambda retries twice more by default.
  • Events that still fail can go to a DLQ (SQS or SNS) or an on-failure destination.

Cold starts and provisioned concurrency

Cold starts: a new execution environment must run the initialization code before its first request; provisioned concurrency prepares environments in advance so requests go straight to invoke; SnapStart restores a saved snapshot of an initialized function, which is much faster than a full init Cold starts: a new execution environment must run the initialization code before its first request; provisioned concurrency prepares environments in advance so requests go straight to invoke; SnapStart restores a saved snapshot of an initialized function, which is much faster than a full init

Three ways a request can start.
  • Cold start:
    • a new instance of the function loads its code and runs the code outside the handler (the init phase);
    • if the init is large (code, dependencies, SDK clients), this can take a while;
    • so the first request served by a new instance has higher latency than the rest.
  • Provisioned concurrency:
    • concurrency is allocated before the function is invoked (in advance);
    • so cold starts never happen and all invocations have low latency;
    • Application Auto Scaling can manage it (on a schedule or a target utilization);
    • it costs money, while reserved concurrency doesn't.
  • Note: cold starts for functions in a VPC were dramatically reduced in 2019, when Lambda moved to shared network interfaces.

Reserved vs provisioned concurrency

  • Reserved concurrency caps and guarantees how many instances a function can run. Free.
  • Provisioned concurrency keeps a number of instances already initialized, ready to answer instantly. Paid. It must fit within the reserved concurrency if both are set.

Lambda SnapStart

  • Improves function start-up performance up to 10×, for Java, Python and .NET.
  • When enabled, the function starts from a pre-initialized state, with no initialization from scratch.
  • When a new version is published:
    • Lambda initializes the function;
    • takes a snapshot of the memory and disk state of the initialized function;
    • caches the snapshot for low-latency access.
  • New execution environments then restore from the snapshot instead of running the init phase.

Updated since the slides

The slides say SnapStart has no extra cost. That's true for Java; for Python and .NET, AWS charges for caching and restoring snapshots.

Exam tips

  • "Function takes longer than 15 minutes" → not Lambda (ECS/Fargate, Batch, or split the work with Step Functions). Note the new 30-minute limit, but exam questions still use 15.
  • "One function's traffic throttles other functions" → reserved concurrency on the critical ones.
  • "Limit a function to protect a database" → reserved concurrency as a cap.
  • "First requests are slow", "latency-sensitive", "no cold starts" → provisioned concurrency (or SnapStart for Java, Python, .NET).
  • "Throttled synchronous call" → HTTP 429. "Failed asynchronous events" → retries, then DLQ or on-failure destination.
  • "Need more than 1,000 concurrent executions" → request a quota increase.
  • "Payload over 6 MB" → put the data in S3 and pass a reference.

Common traps

  • "Reserved concurrency removes cold starts." It only reserves capacity; provisioned concurrency keeps instances warm.
  • "Concurrency limits are per function by default." The 1,000 limit is shared across the Region.
  • "Increase the timeout above the maximum." It can't go past the limit; redesign the job.

Check yourself

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt