-
Notifications
You must be signed in to change notification settings - Fork 60
[FEEDBACK REQUEST] Should AWS Lambda deprecate callback-style function handlers for Node.js 24 and later? #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Definitely deprecate it. People either use it accidentally (due to old examples or documentation), or think that setting |
Yes, sir |
absolutely deprecate it please! |
I've add this to the Middy roadmap to revisit for future major releases. We dropped support for callbacks many yers ago, but still have references within the code. |
Yes |
I literally never use it and I agree with the general sentiment of deprecating it, but the proposal is missing some info on what are the benefits of doing this. Will it help customers in any way, or will it bring performance improvements, or? I imagine that having this info would help others who still use it better evaluate the tradeoffs. |
Yes deprecated please 👍 |
+1
|
Yes please, deprecate the callback pattern. Although not a major issue, but currently having that callback pattern as an option can sometimes lead to people (i.e. developers new to Lambda) to use it "accidentally" (meaning without understanding there are better patterns. So deprecating that callback pattern would mean one thing less to teach / advocate (against) about. |
Firstly, thank you so much for your feedback! Here are a few more details on why we're thinking about deprecating the callback handler:
|
I agree with the idea of deprecating the callback pattern. One thing to consider is that communication might be more challenging than usual in this case. How can we ensure that all AWS examples, documentation, and repositories are properly updated to reflect this change? It’s probably a good idea to issue warnings well in advance, just in case anyone is still relying on this feature. A more cautious approach could be to introduce a deprecation warning in the logs whenever the callback is used, starting with the Node.js 24 runtime. It would be even better if this could also be applied to previously supported runtimes. The feature could then be fully removed in the next major runtime release, such as Node.js 26. |
yessss |
I agree! The async/await pattern has been the standard in modern JavaScript for years and is more intuitive and less error-prone than callback-based code. |
I agree, should be deprecated! |
👍 👎 The AWS Lambda Runtimes team would love your thoughts! Please upvote/downvote to indicate if you support this change.
Currently, AWS Lambda supports both callback-style and async/await function handler signatures. Considering Node.js has fully embraced async/await, we are considering removing support for callback style function handlers starting with our Node.js 24 release later this year. With this change, customers currently using the callback signature will need to update their code to use the async/await signature when migrating their functions to Node.js 24 or later runtimes.
This proposal applies to Node.js 24 and later runtimes only. We will continue to support both callback and async/await function handler signatures in our existing Node.js 18, Node.js 20, and Node.js 22 runtimes.
Current callback-style: (to be removed)
Async/await style: (to be kept as-is)
Should we make this change? Please vote!
👍 : Yes, in favor of deprecating the callback handler signature.
👎 : No, keep the callback handler signature.
Please also share any feedback in the comments.
The text was updated successfully, but these errors were encountered: