What are Lambda's limits, and when should you not use it for ETL?
Lambda allows 128 to 10,240 MB of memory (CPU scales with it), up to 10,240 MB of /tmp, a default of 1,000 concurrent executions per Region (new accounts may start lower) and a maximum timeout that was 15 minutes for years and is 30 minutes in the current docs. Do not use it for large, long ETL transforms.
Main Lambda limits (check the quotas page)
| Limit | Value |
|---|---|
| Memory | 128 MB to 10,240 MB; CPU scales with memory (about 1 vCPU at 1,769 MB) |
| Timeout | Default 3 s. Maximum 1,800 s (30 min) for on-demand functions in the current docs. It was 900 s (15 min) for many years before the increase. Managed Instances functions invoked async or via event source mapping can use up to 90 min |
/tmp storage | 512 MB to 10,240 MB |
| Concurrency | Default 1,000 per Region, can be raised. Not guaranteed for new accounts: the docs say new accounts get reduced concurrency and memory quotas that AWS raises with usage |
| Package | 50 MB zipped upload, 250 MB unzipped (with layers); container image up to 10 GB |
| Payload | 6 MB synchronous request and response; 1 MB asynchronous |
| Scaling rate | 1,000 new execution environments per function every 10 seconds |
Quotas change over time. The timeout is the one that most often appears in old interview answers, so quote it with the date or say "the current docs say 30 minutes; it was 15 minutes until recently".
When not to use Lambda for ETL
Lambda suits short, event-driven steps: validate a file when it lands in S3, start a Glue job or Step Functions workflow, call a small API, transform a small record batch.
Choose Glue, EMR or Fargate when:
- the data is large (multi-GB files, big joins, wide shuffles): Spark distributes the work across many workers, while one Lambda has at most 10 GB of memory and
/tmp, and 6 vCPUs; - the job needs a long, steady run or heavy stateful processing (even a 30-minute limit is a hard ceiling);
- you need Spark features, partition management or bookmarks.
Rule of thumb: if the work fits comfortably in one function's memory and finishes in a few minutes, Lambda is fine; otherwise use a distributed engine.
Example
S3 receives a 20 GB CSV. A Lambda triggered by the upload checks the name and size, then starts a Glue job through Step Functions. Glue converts the CSV to Parquet in parallel. The Lambda only coordinates.
| Limit | Value | Note |
|---|---|---|
| Memory | 128 to 10,240 MB | CPU scales with memory |
| Timeout | Up to 1,800 s (30 min) | Docs now say 30 min; it was 15 min for years |
| /tmp storage | 512 to 10,240 MB | Not enough for multi-GB files |
| Concurrency | 1,000 per Region (default) | New accounts may start lower |
| Payload | 6 MB sync, 1 MB async | Pass S3 references for big data |
| Deployment package | 250 MB unzipped | Container image up to 10 GB |
Key points
- Memory 128 to 10,240 MB with CPU proportional;
/tmpup to 10,240 MB. - Default concurrency is 1,000 per Region, but new accounts may have lower quotas.
- Maximum timeout in the current docs is 30 minutes for on-demand functions (15 minutes until recently).
- Package limits: 250 MB unzipped or a 10 GB container image; payloads 6 MB sync and 1 MB async.
- Use Lambda for short event-driven steps; use Glue or EMR for large or long transformations.
Common mistakes
- Quoting limits from memory without checking the current quotas page.
- Putting a multi-GB transformation into a single Lambda.
- Assuming every account has 1,000 concurrent executions available on day one.
- Treating a longer timeout as a reason to run heavy ETL in Lambda.
Prerequisites
- Lambda basics
- S3 event notifications
Best practices
- Use Lambda as the glue (trigger and coordination) and a distributed engine as the worker.
- Set timeouts just above the real p99, not at the maximum.
- Request quota increases before launches.
- Store large payloads in S3 and pass references.
Likely follow-ups
- What is the difference between reserved and provisioned concurrency?
- How would you trigger a Glue job from an S3 upload using Lambda and Step Functions?
- Why can a Lambda function be throttled even below the account concurrency quota?
- When would you pick Fargate over Lambda for a long-running data job?
- How do you handle files larger than Lambda's /tmp space?
References
- Amazon S3: data consistency model
- Amazon S3: performance guidelines
- AWS Glue: job properties and worker types
- AWS Glue: job bookmarks
- AWS Glue: DynamicFrame class
- AWS Glue: partitions and pushdown predicates
- AWS Glue: EventBridge events
- Amazon Athena: performance tuning
- Amazon Athena: partition projection
- Amazon Athena: pricing
- AWS Lambda: quotas
- AWS Lambda: asynchronous invocation error handling
- AWS Lambda: retry behaviour
- AWS Step Functions: error handling
- AWS Step Functions: Standard vs Express
- AWS Step Functions: AWS Glue integration
- Amazon DynamoDB: condition expressions
- AWS Secrets Manager
- AWS Systems Manager Parameter Store
- IAM: security best practices
- Amazon EMR: instance types and Spot best practices