[Lambda] Memory Issue: Fail Faster
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No repository files, tests, or implementation entry points are identified; start by reviewing AWS Lambda’s documented memory-exhaustion behavior for Python managed and OCI-image runtimes on ARM and x86. Define how a configurable fail-fast mode would distinguish insufficient memory from intentional memory use, and consider the existing timeout behavior as the comparison point.
Written by the indexing model from the issue text.
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about your request
When insufficient memory is allocated to an AWS Lambda function, the function executes until it times out, even though it cannot complete successfully. This results in unnecessary billed duration. A configurable option to fail fast or fail directly when memory is insufficient would be beneficial.
Which service(s) is this request for?
AWS Lambda
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
When a Lambda function lacks sufficient memory, it continues running until the timeout duration is reached. This leads to wasted execution time and higher costs, as users are billed for the full timeout duration. Detecting and stopping such executions earlier would save time and reduce costs.
However, this behavior may not be relevant in all cases. For example, some developers might intentionally use all available memory for caching purposes, or runtimes like Java JVM could utilize all memory without necessarily indicating a failure. For Python runtimes, however, insufficient memory often results in this timeout behavior. Providing an option to configure the default behavior—either fail fast or continue until timeout—would allow developers to tailor Lambda execution to their specific use case.
Are you currently working around this issue?
The current workaround involves setting shorter timeout durations or waiting for the execution to complete to identify memory-related issues. Both approaches are inefficient and do not address the root problem.
Additional context
This issue has been observed with Python runtimes (both managed and OCI-image-based) on ARM and x86 architectures.
Attachments
N/A
- Dominant language
- No language data
- Stars
- 196
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-roadmap
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-lambda-roadmap#101 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
aws/aws-lambda-roadmap#100 ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
aws/aws-lambda-roadmap#97 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-lambda-roadmap#96 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
aws/aws-lambda-roadmap#95 · 1 comment · 1 reaction ·
All issues in aws/aws-lambda-roadmap
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
bug needs-triage service/elbv2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hashicorp/terraform-provider-aws#50100 · 1 comment ·