[Lambda] Binary Invoke API
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No files, tests, or implementation entry points are named. Start by mapping the current REST Invoke API's encoding path and the runtime API compatibility question described in the issue. Done would require a defined binary request and response API that avoids the described encoding passes and works with relevant AWS and third-party integrations.
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
It would be excellent to have a binary API for invoking Lambdas, and receiving responses.
Which service(s) is this request for?
This is a request for Lambda proper, but could benefit integrations with other services (AWS and 3rd party) as well.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Many use cases for Lambda involve processing binary data (network, images, data, etc.). The current REST API requires two full encoding/decoding passes:
- The calling code must encode the binary data to invoke the lambda.
- The Lambda function decodes the request to process it.
- The Lambda function encodes the response.
- The calling code decodes the response.
In addition to the encoding and decoding compute being a burden at scale, encoding inflates the size of payloads (hence reducing the effective payload size).
Removing the encoding would reduce complexity in customer code, reduce compute consumption and increase the effective request and response payload size.
Are you currently working around this issue?
At Proxylity we encode each UDP packet arriving at our service before passing to Lambda. An arriving packet is serialized to JSON with the binary data being base64 encoded before sending to Lambda. Our customers then write (or use library) code that handles the de/reserialization. Our code then decodes the JSON response and sends a the binary data in a UDP response. The encoding alone can account for as much as a third of the CPU time overall for simple handlers.
Additional context
I understand this ask may sound daunting, but could it perhaps be compatible with the current runtime API as an underlay (pre deserialization/serialization)?
Attachments
None at this time.
- 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
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100